Documentation ¶
Overview ¶
Package types contains all the types used across the repo
Index ¶
- Constants
- type AccessList
- type AccessTuple
- type AccountBalanceUpdate
- type AccountRead
- type BigInt
- type Block
- type BlockNonce
- type BlockReplica
- type BlockhashRead
- type Bloom
- type CodeRead
- type ElrondBlockReplica
- type ElrondReceipt
- type ElrondTransaction
- type EpochStartInfo
- type Event
- type Header
- type Log
- type Logs
- type MiniBlock
- type Receipt
- type SCResult
- type StateSpecimen
- type StorageRead
- type Transaction
Constants ¶
View Source
const ( BloomByteLength = 256 BloomBitLength = 8 * BloomByteLength )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessList ¶ added in v1.2.3
type AccessList []AccessTuple
AccessList is an EIP-2930 access list.
type AccessTuple ¶ added in v1.2.3
type AccessTuple struct { Address common.Address `json:"address" gencodec:"required"` StorageKeys []common.Hash `json:"storageKeys" gencodec:"required"` }
AccessTuple is the element type of an access list.
type AccountBalanceUpdate ¶
func NewAccountBalanceUpdate ¶
func NewAccountBalanceUpdate() *AccountBalanceUpdate
func (*AccountBalanceUpdate) Schema ¶
func (o *AccountBalanceUpdate) Schema() avro.Schema
type AccountRead ¶ added in v1.2.3
type BigInt ¶ added in v1.2.3
BigInt is a big.Int wrapper which marshals/unmarshals into byte arrays
func (*BigInt) MarshalJSON ¶ added in v1.2.3
MarshalJSON implements the json.Marshaler interface.
func (*BigInt) MarshalText ¶ added in v1.2.3
MarshalText implements TextMarshaler
func (*BigInt) UnmarshalJSON ¶ added in v1.2.3
UnmarshalJSON implements the json.Unmarshaler interface.
func (*BigInt) UnmarshalText ¶ added in v1.2.3
UnmarshalText implements TextUnmarshaler
type Block ¶
type Block struct { Nonce int64 Round int64 Epoch int32 Hash []byte MiniBlocks []*MiniBlock NotarizedBlocksHashes [][]byte Proposer int64 Validators []int64 PubKeysBitmap []byte Size int64 Timestamp int64 StateRootHash []byte PrevHash []byte ShardID int32 TxCount int32 AccumulatedFees []byte DeveloperFees []byte EpochStartBlock bool EpochStartInfo *EpochStartInfo }
type BlockNonce ¶
type BlockNonce [8]byte
type BlockReplica ¶
type BlockhashRead ¶ added in v1.2.3
type Bloom ¶
type Bloom [BloomByteLength]byte
type ElrondBlockReplica ¶
type ElrondBlockReplica struct { Block *Block Transactions []*ElrondTransaction SCResults []*SCResult Receipts []*ElrondReceipt Logs []*Log StateChanges []*AccountBalanceUpdate }
func NewBlockResult ¶
func NewBlockResult() *ElrondBlockReplica
func (*ElrondBlockReplica) Schema ¶
func (o *ElrondBlockReplica) Schema() avro.Schema
type ElrondReceipt ¶
type ElrondReceipt struct { Hash []byte Value []byte Sender []byte Data []byte TxHash []byte Timestamp int64 }
func NewReceipt ¶
func NewReceipt() *ElrondReceipt
func (*ElrondReceipt) Schema ¶
func (o *ElrondReceipt) Schema() avro.Schema
type ElrondTransaction ¶
type ElrondTransaction struct { Hash []byte MiniBlockHash []byte BlockHash []byte Nonce int64 Round int64 Value []byte Receiver []byte Sender []byte ReceiverShard int32 SenderShard int32 GasPrice int64 GasLimit int64 Data []byte Signature []byte Timestamp int64 SenderUserName []byte ReceiverUserName []byte }
func NewTransaction ¶
func NewTransaction() *ElrondTransaction
func (*ElrondTransaction) Schema ¶
func (o *ElrondTransaction) Schema() avro.Schema
type EpochStartInfo ¶
type EpochStartInfo struct { TotalSupply []byte TotalToDistribute []byte TotalNewlyMinted []byte RewardsPerBlock []byte RewardsForProtocolSustainability []byte NodePrice []byte PrevEpochStartRound int32 PrevEpochStartHash []byte }
func NewEpochStartInfo ¶
func NewEpochStartInfo() *EpochStartInfo
func (*EpochStartInfo) Schema ¶
func (o *EpochStartInfo) Schema() avro.Schema
type Header ¶
type Header struct { ParentHash common.Hash `json:"parentHash"` UncleHash common.Hash `json:"sha3Uncles"` Coinbase common.Address `json:"miner"` Root common.Hash `json:"stateRoot"` TxHash common.Hash `json:"transactionsRoot"` ReceiptHash common.Hash `json:"receiptsRoot"` Bloom Bloom `json:"logsBloom"` Difficulty *BigInt `json:"difficulty"` Number *BigInt `json:"number"` GasLimit uint64 `json:"gasLimit"` GasUsed uint64 `json:"gasUsed"` Time uint64 `json:"timestamp"` Extra []byte `json:"extraData"` MixDigest common.Hash `json:"mixHash"` Nonce BlockNonce `json:"nonce"` BaseFee *BigInt `json:"baseFeePerGas"` WithdrawalsHash *common.Hash `json:"withdrawalsRoot" rlp:"nil,optional"` }
type Logs ¶
type Logs struct { Address common.Address `json:"address"` Topics []common.Hash `json:"topics"` Data []byte `json:"data"` BlockNumber uint64 `json:"blockNumber"` TxHash common.Hash `json:"transactionHash"` TxIndex uint `json:"transactionIndex"` BlockHash common.Hash `json:"blockHash"` Index uint `json:"logIndex"` Removed bool `json:"removed"` }
type MiniBlock ¶
type MiniBlock struct { Hash []byte SenderShardID int32 ReceiverShardID int32 Type int32 Timestamp int64 TxHashes [][]byte }
func NewMiniBlock ¶
func NewMiniBlock() *MiniBlock
type SCResult ¶
type SCResult struct { Hash []byte Nonce int64 GasLimit int64 GasPrice int64 Value []byte Sender []byte Receiver []byte RelayerAddr []byte RelayedValue []byte Code []byte Data []byte PrevTxHash []byte OriginalTxHash []byte CallType int32 CodeMetadata []byte ReturnMessage []byte Timestamp int64 }
func NewSCResult ¶
func NewSCResult() *SCResult
type StateSpecimen ¶
type StateSpecimen struct { AccountRead []*AccountRead StorageRead []*StorageRead CodeRead []*CodeRead BlockhashRead []*BlockhashRead }
type StorageRead ¶ added in v1.2.3
type Transaction ¶
type Transaction struct { Type byte `json:"type"` AccessList AccessList `json:"accessList"` ChainId *BigInt `json:"chainId"` AccountNonce uint64 `json:"nonce"` Price *BigInt `json:"gasPrice"` GasLimit uint64 `json:"gas"` GasTipCap *BigInt `json:"gasTipCap"` GasFeeCap *BigInt `json:"gasFeeCap"` Sender *common.Address `json:"from" rlp:"nil"` Recipient *common.Address `json:"to" rlp:"nil"` // nil means contract creation Amount *BigInt `json:"value"` Payload []byte `json:"input"` V *BigInt `json:"v" rlp:"nilString"` R *BigInt `json:"r" rlp:"nilString"` S *BigInt `json:"s" rlp:"nilString"` }
Click to show internal directories.
Click to hide internal directories.