Documentation ¶
Index ¶
- type AccountContractRow
- type AccountNftRow
- type AccountRow
- type AverageTimeRow
- type BlockRow
- type CurrentTableRow
- type CutPercentageRow
- type DelegatorCommittedRow
- type DelegatorInfoFromAddressRow
- type DelegatorInfoRow
- type GenesisRow
- type NodeCommittedTokensRow
- type NodeInfoFromAddressRow
- type NodeInfosFromTableRow
- type NodeTotalCommitmentRow
- type NodeTotalCommitmentWithoutDelegatorsRow
- type ProposedTableRow
- type SmartContractResultRow
- type StakeRequirementsRow
- type StakingTableRow
- type SupplyRow
- type TokenBalanceRow
- type TotalStakeByTypeRow
- type TotalStakeRow
- type WeeklyPayoutRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountContractRow ¶
type AccountContractRow struct { Address string `db:"address"` ContractAddress string `db:"contract_address"` DeployTxHash string `db:"deploy_tx_hash"` Timestamp int `db:"timestamp"` }
AccountContractRow represents a single row of the account_contract table
func NewAccountContractRow ¶
func NewAccountContractRow( address string, contractAddress string, deployTxHash string, timestamp int) AccountContractRow
AccountContractRow allows to build a new AccountContractRow
func (AccountContractRow) Equal ¶
func (v AccountContractRow) Equal(w AccountContractRow) bool
Equal tells whether v and w represent the same rows
type AccountNftRow ¶
AccountNftRow represents a single row of the account_nft table
func NewAccountNftRow ¶
func NewAccountNftRow( address string, identifier string) AccountNftRow
AccountNftRow allows to build a new AccountNftRow
func (AccountNftRow) Equal ¶
func (v AccountNftRow) Equal(w AccountNftRow) bool
Equal tells whether v and w represent the same rows
type AccountRow ¶
type AccountRow struct { Address string `db:"address"` Balance string `db:"balance"` Nonce string `db:"nonce"` Shard int `db:"shard"` ScamInfo []byte `db:"scam_info"` Code string `db:"code"` CodeHash string `db:"code_hash"` RootHash string `db:"root_hash"` TxCount int `db:"tx_count"` ScrCount int `db:"scr_count"` Username string `db:"username"` DeveloperReward string `db:"developer_reward"` OwnerAddress string `db:"owner_address"` DeployedAt int `db:"deployed_at"` IsUpgradeable bool `db:"is_upgradeable"` IsReadable bool `db:"is_readable"` IsPayable bool `db:"is_payable"` IsPayableBySmartContract bool `db:"is_payable_by_smart_contract"` }
AccountRow represents a single row of the account table
func NewAccountRow ¶
func NewAccountRow( address string, balance string, nonce string, shard int, scamInfo []byte, code string, codeHash string, rootHash string, txCount int, scrCount int, username string, developerReward string, ownerAddress string, deployedAt int, isUpgradeable bool, isReadable bool, isPayable bool, isPayableBySmartContract bool) AccountRow
AccountRow allows to build a new AccountRow
func (AccountRow) Equal ¶
func (v AccountRow) Equal(w AccountRow) bool
Equal tells whether v and w represent the same rows
type AverageTimeRow ¶
type AverageTimeRow struct { OneRowID bool `db:"one_row_id"` AverageTime float64 `db:"average_time"` Height int64 `db:"height"` }
------------------------------------------------------------------------------------------------------------------- AverageTimeRow is the average block time each minute/hour/day
func NewAverageTimeRow ¶
func NewAverageTimeRow(averageTime float64, height int64) AverageTimeRow
func (AverageTimeRow) Equal ¶
func (r AverageTimeRow) Equal(s AverageTimeRow) bool
Equal return true if two AverageTimeRow are true
type BlockRow ¶
type BlockRow struct { Hash string `db:"hash"` Epoch int64 `db:"epoch"` Nonce int64 `db:"nonce"` PrevHash string `db:"prev_hash"` Proposer string `db:"proposer"` PubKeyBitmap string `db:"pub_key_bitmap"` Round int64 `db:"round"` Shard int64 `db:"shard"` Size int64 `db:"size"` SizeTxs int64 `db:"size_txs"` StateRootHash string `db:"state_root_hash"` TimeStamp int64 `db:"time_stamp"` TxCount int64 `db:"tx_count"` GasConsumed int64 `db:"gas_consumed"` GasRefunded int64 `db:"gas_refunded"` GasPenalized int64 `db:"gas_penalized"` MaxGasLimit int64 `db:"max_gas_limit"` }
BlockRow represents a single row of the block table
func NewBlockRow ¶
func NewBlockRow( hash string, epoch int64, nonce int64, prevHash string, proposer string, pubKeyBitmap string, round int64, shard int64, size int64, sizeTxs int64, stateRootHash string, timeStamp int64, txCount int64, gasConsumed int64, gasRefunded int64, gasPenalized int64, maxGasLimit int64) BlockRow
BlockRow allows to build a new BlockRow
type CurrentTableRow ¶
CurrentTableRow represents a single row of the current_table table
func NewCurrentTableRow ¶
func NewCurrentTableRow( height int64, nodeId string) CurrentTableRow
CurrentTableRow allows to build a new CurrentTableRow
func (CurrentTableRow) Equal ¶
func (v CurrentTableRow) Equal(w CurrentTableRow) bool
Equal tells whether v and w represent the same rows
type CutPercentageRow ¶
type CutPercentageRow struct { CutPercentage uint64 `db:"cut_percentage"` Height int64 `db:"height"` }
CutPercentageRow represents a single row of the cut_percentage table
func NewCutPercentageRow ¶
func NewCutPercentageRow( cutPercentage uint64, height int64) CutPercentageRow
CutPercentageRow allows to build a new CutPercentageRow
func (CutPercentageRow) Equal ¶
func (v CutPercentageRow) Equal(w CutPercentageRow) bool
Equal tells whether v and w represent the same rows
type DelegatorCommittedRow ¶
type DelegatorCommittedRow struct { Committed uint64 `db:"committed"` Height uint64 `db:"height"` NodeId string `db:"node_id"` DelegatorID uint32 `db:"delegator_id"` }
DelegatorCommittedRow represents a single row of the delegator_committed table
func NewDelegatorCommittedRow ¶
func NewDelegatorCommittedRow( committed uint64, height uint64, nodeId string, delegatorID uint32) DelegatorCommittedRow
DelegatorCommittedRow allows to build a new DelegatorCommittedRow
func (DelegatorCommittedRow) Equal ¶
func (v DelegatorCommittedRow) Equal(w DelegatorCommittedRow) bool
Equal tells whether v and w represent the same rows
type DelegatorInfoFromAddressRow ¶
type DelegatorInfoFromAddressRow struct { DelegatorInfo string `db:"delegator_info"` Height int64 `db:"height"` Address string `db:"address"` }
DelegatorInfoFromAddressRow represents a single row of the delegator_info_from_address table
func NewDelegatorInfoFromAddressRow ¶
func NewDelegatorInfoFromAddressRow( delegatorInfo string, height int64, address string) DelegatorInfoFromAddressRow
DelegatorInfoFromAddressRow allows to build a new DelegatorInfoFromAddressRow
func (DelegatorInfoFromAddressRow) Equal ¶
func (v DelegatorInfoFromAddressRow) Equal(w DelegatorInfoFromAddressRow) bool
Equal tells whether v and w represent the same rows
type DelegatorInfoRow ¶
type DelegatorInfoRow struct { Id uint32 `db:"id"` NodeId string `db:"node_id"` TokensCommitted uint64 `db:"tokens_committed"` TokensStaked uint64 `db:"tokens_staked"` TokensUnstaking uint64 `db:"tokens_unstaking"` TokensRewarded uint64 `db:"tokens_rewarded"` TokensUnstaked uint64 `db:"tokens_unstaked"` TokensRequestedToUnstake uint64 `db:"tokens_requested_to_unstake"` Height uint64 `db:"height"` }
DelegatorInfoRow represents a single row of the delegator_info table
func NewDelegatorInfoRow ¶
func NewDelegatorInfoRow( id uint32, nodeId string, tokensCommitted uint64, tokensStaked uint64, tokensUnstaking uint64, tokensRewarded uint64, tokensUnstaked uint64, tokensRequestedToUnstake uint64, height uint64) DelegatorInfoRow
DelegatorInfoRow allows to build a new DelegatorInfoRow
func (DelegatorInfoRow) Equal ¶
func (v DelegatorInfoRow) Equal(w DelegatorInfoRow) bool
Equal tells whether v and w represent the same rows
type GenesisRow ¶
type GenesisRow struct { OneRowID bool `db:"one_row_id"` Time time.Time `db:"time"` InitialHeight int64 `db:"initial_height"` ChainId string `db:"chain_id"` }
func NewGenesisRow ¶
func NewGenesisRow(time time.Time, initialHeight int64, chainId string) GenesisRow
func (GenesisRow) Equal ¶
func (r GenesisRow) Equal(s GenesisRow) bool
type NodeCommittedTokensRow ¶
type NodeCommittedTokensRow struct { NodeId string `db:"node_id"` CommittedTokens uint64 `db:"committed_tokens"` Height int64 `db:"height"` }
NodeCommittedTokensRow represents a single row of the node_committed_tokens table
func NewNodeCommittedTokensRow ¶
func NewNodeCommittedTokensRow( nodeId string, committedTokens uint64, height int64) NodeCommittedTokensRow
NodeCommittedTokensRow allows to build a new NodeCommittedTokensRow
func (NodeCommittedTokensRow) Equal ¶
func (v NodeCommittedTokensRow) Equal(w NodeCommittedTokensRow) bool
Equal tells whether v and w represent the same rows
type NodeInfoFromAddressRow ¶
type NodeInfoFromAddressRow struct { Address string `db:"address"` NodeInfo string `db:"node_info"` Height int64 `db:"height"` }
NodeInfoFromNodeIDsRow represents a single row of the node_info_from_address table
func NewNodeInfoFromAddressRow ¶
func NewNodeInfoFromAddressRow( address string, nodeInfo string, height int64) NodeInfoFromAddressRow
NodeInfoFromNodeIDsRow allows to build a new NodeInfoFromNodeIDsRow
func (NodeInfoFromAddressRow) Equal ¶
func (v NodeInfoFromAddressRow) Equal(w NodeInfoFromAddressRow) bool
Equal tells whether v and w represent the same rows
type NodeInfosFromTableRow ¶
type NodeInfosFromTableRow struct { Id string `db:"id"` Role uint8 `db:"role"` NetworkingAddress string `db:"networking_address"` NetworkingKey string `db:"networking_key"` StakingKey string `db:"staking_key"` TokensStaked uint64 `db:"tokens_staked"` TokensCommitted uint64 `db:"tokens_committed"` TokensUnstaking uint64 `db:"tokens_unstaking"` TokensUnstaked uint64 `db:"tokens_unstaked"` TokensRewarded uint64 `db:"tokens_rewarded"` Delegators pq.Int32Array `db:"delegators"` DelegatorIDCounter uint32 `db:"delegator_i_d_counter"` TokensRequestedToUnstake uint64 `db:"tokens_requested_to_unstake"` InitialWeight uint64 `db:"initial_weight"` Height uint64 `db:"height"` }
NodeInfosFromTableRow represents a single row of the node_infos_from_table table
func NewNodeInfosFromTableRow ¶
func NewNodeInfosFromTableRow( id string, role uint8, networkingAddress string, networkingKey string, stakingKey string, tokensStaked uint64, tokensCommitted uint64, tokensUnstaking uint64, tokensUnstaked uint64, tokensRewarded uint64, delegators pq.Int32Array, delegatorIDCounter uint32, tokensRequestedToUnstake uint64, initialWeight uint64, height uint64) NodeInfosFromTableRow
func (NodeInfosFromTableRow) Equal ¶
func (v NodeInfosFromTableRow) Equal(w NodeInfosFromTableRow) bool
Equal tells whether v and w represent the same rows
type NodeTotalCommitmentRow ¶
type NodeTotalCommitmentRow struct { NodeId string `db:"node_id"` TotalCommitment uint64 `db:"total_commitment"` Height int64 `db:"height"` }
NodeTotalCommitmentRow represents a single row of the node_total_commitment table
func NewNodeTotalCommitmentRow ¶
func NewNodeTotalCommitmentRow( nodeId string, totalCommitment uint64, height int64) NodeTotalCommitmentRow
NodeTotalCommitmentRow allows to build a new NodeTotalCommitmentRow
func (NodeTotalCommitmentRow) Equal ¶
func (v NodeTotalCommitmentRow) Equal(w NodeTotalCommitmentRow) bool
Equal tells whether v and w represent the same rows
type NodeTotalCommitmentWithoutDelegatorsRow ¶
type NodeTotalCommitmentWithoutDelegatorsRow struct { NodeId string `db:"node_id"` TotalCommitmentWithoutDelegators uint64 `db:"total_commitment_without_delegators"` Height int64 `db:"height"` }
NodeTotalCommitmentWithoutDelegatorsRow represents a single row of the node_total_commitment_without_delegators table
func NewNodeTotalCommitmentWithoutDelegatorsRow ¶
func NewNodeTotalCommitmentWithoutDelegatorsRow( nodeId string, totalCommitmentWithoutDelegators uint64, height int64) NodeTotalCommitmentWithoutDelegatorsRow
NodeTotalCommitmentWithoutDelegatorsRow allows to build a new NodeTotalCommitmentWithoutDelegatorsRow
func (NodeTotalCommitmentWithoutDelegatorsRow) Equal ¶
func (v NodeTotalCommitmentWithoutDelegatorsRow) Equal(w NodeTotalCommitmentWithoutDelegatorsRow) bool
Equal tells whether v and w represent the same rows
type ProposedTableRow ¶
type ProposedTableRow struct { Height int64 `db:"height"` ProposedTable string `db:"proposed_table"` }
ProposedTableRow represents a single row of the proposed_table table
func NewProposedTableRow ¶
func NewProposedTableRow( height int64, proposedTable string) ProposedTableRow
ProposedTableRow allows to build a new ProposedTableRow
func (ProposedTableRow) Equal ¶
func (v ProposedTableRow) Equal(w ProposedTableRow) bool
Equal tells whether v and w represent the same rows
type SmartContractResultRow ¶
type SmartContractResultRow struct { TxHash string `db:"tx_hash"` Hash string `db:"hash"` Timestamp int64 `db:"timestamp"` Nonce int64 `db:"nonce"` GasLimit int64 `db:"gas_limit"` GasPrice int64 `db:"gas_price"` Value string `db:"value"` Sender string `db:"sender"` Receiver string `db:"receiver"` RelayedValue string `db:"relayed_value"` Data string `db:"data"` PrevTxHash string `db:"prev_tx_hash"` OriginalTxHash string `db:"original_tx_hash"` CallType string `db:"call_type"` Logs string `db:"logs"` }
SmartContractResultRow represents a single row of the smart_contract_result table
func NewSmartContractResultRow ¶
func NewSmartContractResultRow( txHash string, hash string, timestamp int64, nonce int64, gasLimit int64, gasPrice int64, value string, sender string, receiver string, relayedValue string, data string, prevTxHash string, originalTxHash string, callType string, logs string) SmartContractResultRow
SmartContractResultRow allows to build a new SmartContractResultRow
func (SmartContractResultRow) Equal ¶
func (v SmartContractResultRow) Equal(w SmartContractResultRow) bool
Equal tells whether v and w represent the same rows
type StakeRequirementsRow ¶
type StakeRequirementsRow struct { Height int64 `db:"height"` Role int8 `db:"role"` Requirements uint64 `db:"requirements"` }
StakeRequirementsRow represents a single row of the stake_requirements table
func NewStakeRequirementsRow ¶
func NewStakeRequirementsRow( height int64, role int8, requirements uint64) StakeRequirementsRow
StakeRequirementsRow allows to build a new StakeRequirementsRow
func (StakeRequirementsRow) Equal ¶
func (v StakeRequirementsRow) Equal(w StakeRequirementsRow) bool
Equal tells whether v and w represent the same rows
type StakingTableRow ¶
type StakingTableRow struct {
NodeId string `db:"node_id"`
}
StakingTableRow represents a single row of the staking_table table
func NewStakingTableRow ¶
func NewStakingTableRow( nodeId string) StakingTableRow
StakingTableRow allows to build a new StakingTableRow
func (StakingTableRow) Equal ¶
func (v StakingTableRow) Equal(w StakingTableRow) bool
Equal tells whether v and w represent the same rows
type SupplyRow ¶
type SupplyRow struct { OneRowId bool `db:"one_row_id"` Height uint64 `db:"height"` Supply uint64 `db:"supply"` }
SupplyRow represents a single row of the supply table
func NewSupplyRow ¶
SupplyRow allows to build a new SupplyRow
type TokenBalanceRow ¶
type TokenBalanceRow struct { Address string `db:"address"` Identifier string `db:"identifier"` Balance string `db:"balance"` }
TokenBalanceRow represents a single row of the token_balance table
func NewTokenBalanceRow ¶
func NewTokenBalanceRow( address string, identifier string, balance string) TokenBalanceRow
TokenBalanceRow allows to build a new TokenBalanceRow
func (TokenBalanceRow) Equal ¶
func (v TokenBalanceRow) Equal(w TokenBalanceRow) bool
Equal tells whether v and w represent the same rows
type TotalStakeByTypeRow ¶
type TotalStakeByTypeRow struct { Height int64 `db:"height"` Role int8 `db:"role"` TotalStake uint64 `db:"total_stake"` }
TotalStakeRow represents a single row of the total_stake table
func NewTotalStakeByTypeRow ¶
func NewTotalStakeByTypeRow( height int64, role int8, totalStake uint64) TotalStakeByTypeRow
TotalStakeRow allows to build a new TotalStakeRow
func (TotalStakeByTypeRow) Equal ¶
func (v TotalStakeByTypeRow) Equal(w TotalStakeByTypeRow) bool
Equal tells whether v and w represent the same rows
type TotalStakeRow ¶
TotalStakeRow represents a single row of the total_stake table
func NewTotalStakeRow ¶
func NewTotalStakeRow( height int64, totalStake uint64) TotalStakeRow
TotalStakeRow allows to build a new TotalStakeRow
func (TotalStakeRow) Equal ¶
func (v TotalStakeRow) Equal(w TotalStakeRow) bool
Equal tells whether v and w represent the same rows
type WeeklyPayoutRow ¶
WeeklyPayoutRow represents a single row of the weekly_payout table
func NewWeeklyPayoutRow ¶
func NewWeeklyPayoutRow( height int64, payout uint64) WeeklyPayoutRow
WeeklyPayoutRow allows to build a new WeeklyPayoutRow
func (WeeklyPayoutRow) Equal ¶
func (v WeeklyPayoutRow) Equal(w WeeklyPayoutRow) bool
Equal tells whether v and w represent the same rows