Documentation ¶
Index ¶
- Constants
- Variables
- func ReceiptIsUnconfirmed(txr *types.Receipt) bool
- type Account
- type Head
- func (h *Head) ChainLength() int64
- func (h *Head) EarliestInChain() *Head
- func (h *Head) GreaterThan(r *Head) bool
- func (h *Head) MarshalJSON() ([]byte, error)
- func (h *Head) NextInt() *big.Int
- func (h *Head) String() string
- func (h *Head) ToInt() *big.Int
- func (h *Head) UnmarshalJSON(bs []byte) error
- type Job
- type JobState
- type Log
- type Tx
- type TxAttempt
- type TxAttemptState
- type TxReceipt
- type TxState
Constants ¶
View Source
const ( TxStateUnstarted = TxState("unstarted") TxStateInProgress = TxState("in_progress") TxStateFatalError = TxState("fatal_error") TxStateUnconfirmed = TxState("unconfirmed") TxStateConfirmed = TxState("confirmed") TxStateConfirmedMissingReceipt = TxState("confirmed_missing_receipt") TxAttemptStateInProgress = TxAttemptState("in_progress") TxAttemptStateInsufficientEth = TxAttemptState("insufficient_eth") TxAttemptStateBroadcast = TxAttemptState("broadcast") JobStateUnhandled = JobState("unhandled") JobStateHandled = JobState("handled") )
Variables ¶
WeiPerEth is amount of Wei currency units in one Eth.
Functions ¶
func ReceiptIsUnconfirmed ¶
ReceiptIsUnconfirmed returns true if the transaction is not confirmed.
Types ¶
type Head ¶
type Head struct { Hash common.Hash Number int64 ParentHash common.Hash Timestamp time.Time Parent *Head // not persisted, filled in Chain() }
Head represents a BlockNumber, BlockHash.
func NewHead ¶
func NewHead(number *big.Int, blockHash common.Hash, parentHash common.Hash, timestamp uint64) *Head
NewHead returns a Head instance.
func (*Head) ChainLength ¶
ChainLength returns the length of the chain by following the parents.
func (*Head) EarliestInChain ¶
EarliestInChain traces through parents until it finds the earliest one.
func (*Head) GreaterThan ¶
GreaterThan compares BlockNumbers and returns true if the receiver BlockNumber is greater than the supplied BlockNumber.
func (*Head) MarshalJSON ¶
func (*Head) NextInt ¶
NextInt returns the next BlockNumber as big.int, or nil if nil to represent latest.
func (*Head) UnmarshalJSON ¶
type Tx ¶
type TxAttempt ¶
type TxAttempt struct { ID uuid.UUID TxID uuid.UUID GasPrice *big.Int SignedRawTx []byte Hash common.Hash BroadcastBeforeBlockNum int64 State TxAttemptState TxReceiptIDs []uuid.UUID }
func (*TxAttempt) GetSignedTx ¶
func (a *TxAttempt) GetSignedTx() (*types.Transaction, error)
GetSignedTx decodes the SignedRawTx into a types.Transaction struct
type TxAttemptState ¶
type TxAttemptState string
Click to show internal directories.
Click to hide internal directories.