Documentation ¶
Overview ¶
Package types implements different core types of the API.
Package types implements different core types of the API.
Package types implements different core types of the API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
Address is a wrapper around common.Address that implements the sql.Scanner and driver.Valuer interfaces.
type Big ¶
Big is a wrapper around hexutil.Big that implements the sql.Scanner and driver.Valuer interfaces.
type Block ¶
type Block struct { // Number represents the block number. nil when its pending block. Number hexutil.Uint64 `json:"number"` // Epoch represents the block epoch. Epoch hexutil.Uint64 `json:"epoch"` // Hash represents hash of the block. nil when its pending block. Hash common.Hash `json:"hash"` // ParentHash represents hash of the parent block. ParentHash common.Hash `json:"parentHash"` // Size represents the size of this block in bytes. Size hexutil.Uint64 `json:"size"` // GasLimit represents the maximum gas allowed in this block. GasLimit hexutil.Uint64 `json:"gasLimit"` // GasUsed represents the actual total used gas by all transactions in this block. GasUsed hexutil.Uint64 `json:"gasUsed"` // TimeStamp represents the unix timestamp for when the block was collated. TimeStamp hexutil.Uint64 `json:"timestamp"` // Txs represents array of 32 bytes hashes of transactions included in the block. Txs []*common.Hash `json:"transactions"` }
Block represents basic information provided by the API about block inside Opera blockchain.
type Hash ¶
Hash is a wrapper around common.Hash that implements the sql.Scanner and driver.Valuer interfaces.
type Project ¶
type Project struct { Id int64 `db:"id"` ProjectId uint64 `db:"project_id"` OwnerAddress *Address `db:"owner_address"` ReceiverAddress *Address `db:"receiver_address"` Name string `db:"name"` Url string `db:"url"` ImageUrl string `db:"image_url"` LastWithdrawalEpoch *uint64 `db:"last_withdrawal_epoch"` CollectedRewards *Big `db:"collected_rewards"` ClaimedRewards *Big `db:"claimed_rewards"` RewardsToClaim *Big `db:"rewards_to_claim"` TransactionsCount uint64 `db:"transactions_count"` ActiveFromEpoch uint64 `db:"active_from_epoch"` ActiveToEpoch *uint64 `db:"active_to_epoch"` }
type ProjectContract ¶
type ProjectMetadata ¶
type Transaction ¶
type Transaction struct { Id int64 `db:"id"` // ProjectId represents the project ID this transaction belongs to. ProjectId int64 `db:"project_id"` // Hash represents 32 bytes hash of the transaction. Hash *Hash `json:"hash" db:"hash"` // BlockHash represents hash of the block where this transaction was in. nil when it's pending. BlockHash *Hash `json:"blockHash" db:"block_hash"` // BlockNumber represents number of the block where this transaction was in. nil when it's pending. BlockNumber *hexutil.Uint64 `json:"blockNumber" db:"block_number"` // Epoch represents the epoch that transaction belongs to. Epoch hexutil.Uint64 `db:"epoch_number"` // Timestamp represents the time stamp of the transaction. Timestamp time.Time `json:"timestamp" db:"timestamp"` // From represents address of the sender. From *Address `json:"from" db:"from_address"` // To represents the address of the receiver. nil when it's a contract creation transaction. To *Address `json:"to,omitempty" db:"to_address"` // GasUsed represents the amount of gas used by this specific transaction alone. GasUsed *hexutil.Uint64 `json:"gasUsed" db:"gas_used"` // GasPrice represents gas price provided by the sender in Wei. GasPrice *Big `json:"gasPrice" db:"gas_price"` // RewardToClaim represents the amount of reward to claim in Wei. RewardToClaim *Big `db:"reward_to_claim"` // Logs represents a list of log records created along with the transaction Logs []types.Log `json:"logs"` }
Transaction represents basic information provided by the API about transaction inside Opera blockchain.
type TransactionTrace ¶
type TransactionTrace struct { Action *TransactionTraceAction `json:"action"` Result *TransactionTraceResult `json:"result"` Error *string `json:"error"` TraceAddress []int `json:"traceAddress"` }
TransactionTrace represents a transaction trace record.
func (*TransactionTrace) ParentStringPath ¶
func (t *TransactionTrace) ParentStringPath() *string
ParentStringPath returns the trace address of a prent as a string path.
func (*TransactionTrace) StringPath ¶
func (t *TransactionTrace) StringPath() string
StringPath returns the trace address as a string path.