Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { ID int32 `json:"id" sql:",pk"` Height int64 `json:"height" sql:",notnull"` Proposer string `json:"proposer" sql:",notnull"` Moniker string `json:"moniker" sql:",notnull"` BlockHash string `json:"block_hash" sql:",notnull,unique"` ParentHash string `json:"parent_hash" sql:",notnull"` NumPrecommits int64 `json:"num_pre_commits" sql:",notnull"` NumTxs int64 `json:"num_txs" sql:"default:0"` Timestamp time.Time `json:"timestamp" sql:"default:now()"` }
Block defines the structure for block information.
type PreCommit ¶
type PreCommit struct { ID int32 `json:"id" sql:",pk"` Height int64 `json:"height" sql:",notnull"` Round int32 `json:"round" sql:",notnull"` ValidatorAddress string `json:"validator_address" sql:",notnull"` VotingPower int64 `json:"voting_power" sql:",notnull"` ProposerPriority int64 `json:"proposer_priority" sql:",notnull"` Timestamp time.Time `json:"timestamp" sql:"default:now()"` }
PreCommit defines the schema for precommit state information.
type Transaction ¶
type Transaction struct { ID int32 `json:"id" sql:",pk"` TxType string `json:"tx_type" sql:",notnull"` Height int64 `json:"height" sql:",notnull"` TxHash string `json:"tx_hash" sql:",notnull,unique"` Code uint32 `json:"code" sql:",notnull"` Messages string `json:"messages" sql:"type:jsonb, notnull, default: '[]'::jsonb"` Signatures string `json:"signatures" sql:"type:jsonb, notnull, default: '[]'::jsonb"` Log string `json:"log" sql:"type:jsonb, notnull, default: '[]'::jsonb"` Info string `json:"info"` Memo string `json:"memo"` Events string `json:"events" sql:"type:jsonb, notnull, default: '[]'::jsonb"` EVMTxData string `json:"evm_tx_data" sql:"type:jsonb, notnull, default: '[]'::jsonb"` EVMTxFrom string `json:"evm_tx_from"` EVMTxFromAccAddr string `json:"evm_tx_from_acc"` GasWanted int64 `json:"gas_wanted" sql:"default:0"` GasUsed int64 `json:"gas_used" sql:"default:0"` Timestamp time.Time `json:"timestamp" sql:"default:now()"` }
Transaction defines the structure for transaction information.
func NewTransaction ¶
func NewTransaction(t Transaction) *Transaction
NewTransaction returns a new Transaction.
type Validator ¶
type Validator struct { ID int32 `json:"id" sql:",pk"` Moniker string `json:"moniker"` OperatorAddress string `json:"operator_address" sql:",notnull, unique"` ConsensusAddress string `json:"consensus_address" sql:",notnull, unique"` Jailed bool `json:"jailed"` Status string `json:"status"` Tokens string `json:"tokens"` VotingPower int64 `json:"voting_power"` UnbondingHeight int64 `json:"unbonding_height" sql:"default:0"` UnbondingTime time.Time `json:"unbonding_time"` CommissionRate string `json:"commission_rate"` CommissionMaxRate string `json:"commission_max_rate"` CommissionMaxChangeRate string `json:"commission_max_change_rate"` CommissionUpdateTime time.Time `json:"commission_update_time"` Timestamp time.Time `json:"timestamp" sql:"default:now()"` }
Validator defines the structure for validator information.
Click to show internal directories.
Click to hide internal directories.