pbeth

package
v0.0.0-...-53734fa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TransactionTraceStatus_name = map[int32]string{
		0: "UNKNOWN",
		1: "SUCCEEDED",
		2: "FAILED",
		3: "REVERTED",
	}
	TransactionTraceStatus_value = map[string]int32{
		"UNKNOWN":   0,
		"SUCCEEDED": 1,
		"FAILED":    2,
		"REVERTED":  3,
	}
)

Enum value maps for TransactionTraceStatus.

View Source
var (
	CallType_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "CALL",
		2: "CALLCODE",
		3: "DELEGATE",
		4: "STATIC",
		5: "CREATE",
	}
	CallType_value = map[string]int32{
		"UNSPECIFIED": 0,
		"CALL":        1,
		"CALLCODE":    2,
		"DELEGATE":    3,
		"STATIC":      4,
		"CREATE":      5,
	}
)

Enum value maps for CallType.

View Source
var (
	TransactionTrace_Type_name = map[int32]string{
		0: "TRX_TYPE_LEGACY",
		1: "TRX_TYPE_ACCESS_LIST",
		2: "TRX_TYPE_DYNAMIC_FEE",
	}
	TransactionTrace_Type_value = map[string]int32{
		"TRX_TYPE_LEGACY":      0,
		"TRX_TYPE_ACCESS_LIST": 1,
		"TRX_TYPE_DYNAMIC_FEE": 2,
	}
)

Enum value maps for TransactionTrace_Type.

View Source
var (
	BalanceChange_Reason_name = map[int32]string{
		0:  "REASON_UNKNOWN",
		1:  "REASON_REWARD_MINE_UNCLE",
		2:  "REASON_REWARD_MINE_BLOCK",
		3:  "REASON_DAO_REFUND_CONTRACT",
		4:  "REASON_DAO_ADJUST_BALANCE",
		5:  "REASON_TRANSFER",
		6:  "REASON_GENESIS_BALANCE",
		7:  "REASON_GAS_BUY",
		8:  "REASON_REWARD_TRANSACTION_FEE",
		14: "REASON_REWARD_FEE_RESET",
		9:  "REASON_GAS_REFUND",
		10: "REASON_TOUCH_ACCOUNT",
		11: "REASON_SUICIDE_REFUND",
		13: "REASON_SUICIDE_WITHDRAW",
		12: "REASON_CALL_BALANCE_OVERRIDE",
		15: "REASON_BURN",
	}
	BalanceChange_Reason_value = map[string]int32{
		"REASON_UNKNOWN":                0,
		"REASON_REWARD_MINE_UNCLE":      1,
		"REASON_REWARD_MINE_BLOCK":      2,
		"REASON_DAO_REFUND_CONTRACT":    3,
		"REASON_DAO_ADJUST_BALANCE":     4,
		"REASON_TRANSFER":               5,
		"REASON_GENESIS_BALANCE":        6,
		"REASON_GAS_BUY":                7,
		"REASON_REWARD_TRANSACTION_FEE": 8,
		"REASON_REWARD_FEE_RESET":       14,
		"REASON_GAS_REFUND":             9,
		"REASON_TOUCH_ACCOUNT":          10,
		"REASON_SUICIDE_REFUND":         11,
		"REASON_SUICIDE_WITHDRAW":       13,
		"REASON_CALL_BALANCE_OVERRIDE":  12,
		"REASON_BURN":                   15,
	}
)

Enum value maps for BalanceChange_Reason.

View Source
var (
	GasChange_Reason_name = map[int32]string{
		0:  "REASON_UNKNOWN",
		1:  "REASON_CALL",
		2:  "REASON_CALL_CODE",
		3:  "REASON_CALL_DATA_COPY",
		4:  "REASON_CODE_COPY",
		5:  "REASON_CODE_STORAGE",
		6:  "REASON_CONTRACT_CREATION",
		7:  "REASON_CONTRACT_CREATION2",
		8:  "REASON_DELEGATE_CALL",
		9:  "REASON_EVENT_LOG",
		10: "REASON_EXT_CODE_COPY",
		11: "REASON_FAILED_EXECUTION",
		12: "REASON_INTRINSIC_GAS",
		13: "REASON_PRECOMPILED_CONTRACT",
		14: "REASON_REFUND_AFTER_EXECUTION",
		15: "REASON_RETURN",
		16: "REASON_RETURN_DATA_COPY",
		17: "REASON_REVERT",
		18: "REASON_SELF_DESTRUCT",
		19: "REASON_STATIC_CALL",
		20: "REASON_STATE_COLD_ACCESS",
	}
	GasChange_Reason_value = map[string]int32{
		"REASON_UNKNOWN":                0,
		"REASON_CALL":                   1,
		"REASON_CALL_CODE":              2,
		"REASON_CALL_DATA_COPY":         3,
		"REASON_CODE_COPY":              4,
		"REASON_CODE_STORAGE":           5,
		"REASON_CONTRACT_CREATION":      6,
		"REASON_CONTRACT_CREATION2":     7,
		"REASON_DELEGATE_CALL":          8,
		"REASON_EVENT_LOG":              9,
		"REASON_EXT_CODE_COPY":          10,
		"REASON_FAILED_EXECUTION":       11,
		"REASON_INTRINSIC_GAS":          12,
		"REASON_PRECOMPILED_CONTRACT":   13,
		"REASON_REFUND_AFTER_EXECUTION": 14,
		"REASON_RETURN":                 15,
		"REASON_RETURN_DATA_COPY":       16,
		"REASON_REVERT":                 17,
		"REASON_SELF_DESTRUCT":          18,
		"REASON_STATIC_CALL":            19,
		"REASON_STATE_COLD_ACCESS":      20,
	}
)

Enum value maps for GasChange_Reason.

View Source
var File_sf_ethereum_type_v2_type_proto protoreflect.FileDescriptor

Functions

func BlockToBuffer

func BlockToBuffer(block *Block) ([]byte, error)

func MustBlockToBuffer

func MustBlockToBuffer(block *Block) []byte

func NormalizeSignaturePoint

func NormalizeSignaturePoint(value []byte) []byte

Types

type AccessTuple

type AccessTuple struct {
	Address     []byte   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	StorageKeys [][]byte `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storage_keys,omitempty"`
	// contains filtered or unexported fields
}

AccessTuple represents a list of storage keys for a given contract's address and is used for AccessList construction.

func (*AccessTuple) Descriptor deprecated

func (*AccessTuple) Descriptor() ([]byte, []int)

Deprecated: Use AccessTuple.ProtoReflect.Descriptor instead.

func (*AccessTuple) GetAddress

func (x *AccessTuple) GetAddress() []byte

func (*AccessTuple) GetStorageKeys

func (x *AccessTuple) GetStorageKeys() [][]byte

func (*AccessTuple) ProtoMessage

func (*AccessTuple) ProtoMessage()

func (*AccessTuple) ProtoReflect

func (x *AccessTuple) ProtoReflect() protoreflect.Message

func (*AccessTuple) Reset

func (x *AccessTuple) Reset()

func (*AccessTuple) String

func (x *AccessTuple) String() string

type AccountCreation

type AccountCreation struct {
	Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	Ordinal uint64 `protobuf:"varint,2,opt,name=ordinal,proto3" json:"ordinal,omitempty"`
	// contains filtered or unexported fields
}

func (*AccountCreation) Descriptor deprecated

func (*AccountCreation) Descriptor() ([]byte, []int)

Deprecated: Use AccountCreation.ProtoReflect.Descriptor instead.

func (*AccountCreation) GetAccount

func (x *AccountCreation) GetAccount() []byte

func (*AccountCreation) GetOrdinal

func (x *AccountCreation) GetOrdinal() uint64

func (*AccountCreation) ProtoMessage

func (*AccountCreation) ProtoMessage()

func (*AccountCreation) ProtoReflect

func (x *AccountCreation) ProtoReflect() protoreflect.Message

func (*AccountCreation) Reset

func (x *AccountCreation) Reset()

func (*AccountCreation) String

func (x *AccountCreation) String() string

type BalanceChange

type BalanceChange struct {
	Address  []byte               `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	OldValue *BigInt              `protobuf:"bytes,2,opt,name=old_value,json=oldValue,proto3" json:"old_value,omitempty"`
	NewValue *BigInt              `protobuf:"bytes,3,opt,name=new_value,json=newValue,proto3" json:"new_value,omitempty"`
	Reason   BalanceChange_Reason `protobuf:"varint,4,opt,name=reason,proto3,enum=sf.ethereum.type.v2.BalanceChange_Reason" json:"reason,omitempty"`
	Ordinal  uint64               `protobuf:"varint,5,opt,name=ordinal,proto3" json:"ordinal,omitempty"`
	// contains filtered or unexported fields
}

func (*BalanceChange) Descriptor deprecated

func (*BalanceChange) Descriptor() ([]byte, []int)

Deprecated: Use BalanceChange.ProtoReflect.Descriptor instead.

func (*BalanceChange) GetAddress

func (x *BalanceChange) GetAddress() []byte

func (*BalanceChange) GetNewValue

func (x *BalanceChange) GetNewValue() *BigInt

func (*BalanceChange) GetOldValue

func (x *BalanceChange) GetOldValue() *BigInt

func (*BalanceChange) GetOrdinal

func (x *BalanceChange) GetOrdinal() uint64

func (*BalanceChange) GetReason

func (x *BalanceChange) GetReason() BalanceChange_Reason

func (*BalanceChange) ProtoMessage

func (*BalanceChange) ProtoMessage()

func (*BalanceChange) ProtoReflect

func (x *BalanceChange) ProtoReflect() protoreflect.Message

func (*BalanceChange) Reset

func (x *BalanceChange) Reset()

func (*BalanceChange) String

func (x *BalanceChange) String() string

type BalanceChange_Reason

type BalanceChange_Reason int32

Obtain all balanche change reasons under deep mind repository:

```shell ack -ho 'BalanceChangeReason\(".*"\)' | grep -Eo '".*"' | sort | uniq ```

const (
	BalanceChange_REASON_UNKNOWN                BalanceChange_Reason = 0
	BalanceChange_REASON_REWARD_MINE_UNCLE      BalanceChange_Reason = 1
	BalanceChange_REASON_REWARD_MINE_BLOCK      BalanceChange_Reason = 2
	BalanceChange_REASON_DAO_REFUND_CONTRACT    BalanceChange_Reason = 3
	BalanceChange_REASON_DAO_ADJUST_BALANCE     BalanceChange_Reason = 4
	BalanceChange_REASON_TRANSFER               BalanceChange_Reason = 5
	BalanceChange_REASON_GENESIS_BALANCE        BalanceChange_Reason = 6
	BalanceChange_REASON_GAS_BUY                BalanceChange_Reason = 7
	BalanceChange_REASON_REWARD_TRANSACTION_FEE BalanceChange_Reason = 8
	BalanceChange_REASON_REWARD_FEE_RESET       BalanceChange_Reason = 14
	BalanceChange_REASON_GAS_REFUND             BalanceChange_Reason = 9
	BalanceChange_REASON_TOUCH_ACCOUNT          BalanceChange_Reason = 10
	BalanceChange_REASON_SUICIDE_REFUND         BalanceChange_Reason = 11
	BalanceChange_REASON_SUICIDE_WITHDRAW       BalanceChange_Reason = 13
	BalanceChange_REASON_CALL_BALANCE_OVERRIDE  BalanceChange_Reason = 12
	// Used on chain(s) where some Ether burning happens
	BalanceChange_REASON_BURN BalanceChange_Reason = 15
)

func MustBalanceChangeReasonFromString

func MustBalanceChangeReasonFromString(reason string) BalanceChange_Reason

func (BalanceChange_Reason) Descriptor

func (BalanceChange_Reason) Enum

func (BalanceChange_Reason) EnumDescriptor deprecated

func (BalanceChange_Reason) EnumDescriptor() ([]byte, []int)

Deprecated: Use BalanceChange_Reason.Descriptor instead.

func (BalanceChange_Reason) Number

func (BalanceChange_Reason) String

func (x BalanceChange_Reason) String() string

func (BalanceChange_Reason) Type

type BigInt

type BigInt struct {
	Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"`
	// contains filtered or unexported fields
}

func BigIntFromBytes

func BigIntFromBytes(in []byte) *BigInt

BigIntFromBytes creates a new `pbeth.BigInt` from the received bytes. If the the received bytes is nil or of length 0, then `nil` is returned directly.

func BigIntFromNative

func BigIntFromNative(in *big.Int) *BigInt

func NewBigInt

func NewBigInt(in int64) *BigInt

func (*BigInt) Descriptor deprecated

func (*BigInt) Descriptor() ([]byte, []int)

Deprecated: Use BigInt.ProtoReflect.Descriptor instead.

func (*BigInt) GetBytes

func (x *BigInt) GetBytes() []byte

func (*BigInt) MarshalJSON

func (m *BigInt) MarshalJSON() ([]byte, error)

func (*BigInt) MarshalJSONPB

func (m *BigInt) MarshalJSONPB(marshaler *jsonpb.Marshaler) ([]byte, error)

func (*BigInt) Native

func (m *BigInt) Native() *big.Int

func (*BigInt) ProtoMessage

func (*BigInt) ProtoMessage()

func (*BigInt) ProtoReflect

func (x *BigInt) ProtoReflect() protoreflect.Message

func (*BigInt) Reset

func (x *BigInt) Reset()

func (*BigInt) String

func (x *BigInt) String() string

func (*BigInt) Uint64

func (m *BigInt) Uint64() uint64

func (*BigInt) UnmarshalJSON

func (m *BigInt) UnmarshalJSON(in []byte) (err error)

func (*BigInt) UnmarshalJSONPB

func (m *BigInt) UnmarshalJSONPB(unmarshaler *jsonpb.Unmarshaler, in []byte) (err error)

type Block

type Block struct {
	Ver    int32        `protobuf:"varint,1,opt,name=ver,proto3" json:"ver,omitempty"`
	Hash   []byte       `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	Number uint64       `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"`
	Size   uint64       `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
	Header *BlockHeader `protobuf:"bytes,5,opt,name=header,proto3" json:"header,omitempty"`
	// Uncles represents block produced with a valid solution but were not actually choosen
	// as the canonical block for the given height so they are mostly "forked" blocks.
	//
	// If the Block has been produced using the Proof of Stake consensus algorithm, this
	// field will actually be always empty.
	Uncles            []*BlockHeader      `protobuf:"bytes,6,rep,name=uncles,proto3" json:"uncles,omitempty"`
	TransactionTraces []*TransactionTrace `protobuf:"bytes,10,rep,name=transaction_traces,json=transactionTraces,proto3" json:"transaction_traces,omitempty"`
	BalanceChanges    []*BalanceChange    `protobuf:"bytes,11,rep,name=balance_changes,json=balanceChanges,proto3" json:"balance_changes,omitempty"`
	CodeChanges       []*CodeChange       `protobuf:"bytes,20,rep,name=code_changes,json=codeChanges,proto3" json:"code_changes,omitempty"`
	// contains filtered or unexported fields
}

func (*Block) AsRef

func (b *Block) AsRef() bstream.BlockRef

func (*Block) Descriptor deprecated

func (*Block) Descriptor() ([]byte, []int)

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetBalanceChanges

func (x *Block) GetBalanceChanges() []*BalanceChange

func (*Block) GetCodeChanges

func (x *Block) GetCodeChanges() []*CodeChange

func (*Block) GetHash

func (x *Block) GetHash() []byte

func (*Block) GetHeader

func (x *Block) GetHeader() *BlockHeader

func (*Block) GetNumber

func (x *Block) GetNumber() uint64

func (*Block) GetSize

func (x *Block) GetSize() uint64

func (*Block) GetTransactionTraces

func (x *Block) GetTransactionTraces() []*TransactionTrace

func (*Block) GetUncles

func (x *Block) GetUncles() []*BlockHeader

func (*Block) GetVer

func (x *Block) GetVer() int32

func (*Block) ID

func (b *Block) ID() string

func (*Block) LIBNum

func (b *Block) LIBNum() uint64

FIXME: This logic at some point is hard-coded and will need to be re-visited in regard

of the fork logic.

func (*Block) MustTime

func (b *Block) MustTime() time.Time

func (*Block) NormalizeInPlace

func (block *Block) NormalizeInPlace()

NormalizeBlockInPlace

func (*Block) Num

func (b *Block) Num() uint64

func (*Block) PopulateLogBlockIndices

func (block *Block) PopulateLogBlockIndices() error

PopulateLogBlockIndices fixes the `TransactionReceipt.Logs[].BlockIndex` that is not properly populated by our deep mind instrumentation.

func (*Block) PreviousID

func (b *Block) PreviousID() string

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

func (x *Block) ProtoReflect() protoreflect.Message

func (*Block) Reset

func (x *Block) Reset()

func (*Block) String

func (x *Block) String() string

func (*Block) Time

func (b *Block) Time() (time.Time, error)

type BlockHeader

type BlockHeader struct {
	ParentHash []byte `protobuf:"bytes,1,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"`
	// Uncle hash of the block, some reference it as `sha3Uncles`, but `sha3“ is badly worded, so we prefer `uncle_hash`, also
	// referred as `ommers` in EIP specification.
	//
	// If the Block containing this `BlockHeader` has been produced using the Proof of Stake
	// consensus algorithm, this field will actually be constant and set to `0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347`.
	UncleHash        []byte `protobuf:"bytes,2,opt,name=uncle_hash,json=uncleHash,proto3" json:"uncle_hash,omitempty"`
	Coinbase         []byte `protobuf:"bytes,3,opt,name=coinbase,proto3" json:"coinbase,omitempty"`
	StateRoot        []byte `protobuf:"bytes,4,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"`
	TransactionsRoot []byte `protobuf:"bytes,5,opt,name=transactions_root,json=transactionsRoot,proto3" json:"transactions_root,omitempty"`
	ReceiptRoot      []byte `protobuf:"bytes,6,opt,name=receipt_root,json=receiptRoot,proto3" json:"receipt_root,omitempty"`
	LogsBloom        []byte `protobuf:"bytes,7,opt,name=logs_bloom,json=logsBloom,proto3" json:"logs_bloom,omitempty"`
	// Difficulty is the difficulty of the Proof of Work algorithm that was required to compute a solution.
	//
	// If the Block containing this `BlockHeader` has been produced using the Proof of Stake
	// consensus algorithm, this field will actually be constant and set to `0x00`.
	Difficulty *BigInt `protobuf:"bytes,8,opt,name=difficulty,proto3" json:"difficulty,omitempty"`
	// TotalDifficulty is the sum of all previous blocks difficulty including this block difficulty.
	//
	// If the Block containing this `BlockHeader` has been produced using the Proof of Stake
	// consensus algorithm, this field will actually be constant and set to the terminal total difficulty
	// that was required to transition to Proof of Stake algorithm, which varies per network. It is set to
	// 58 750 000 000 000 000 000 000 on Ethereum Mainnet and to 10 790 000 on Ethereum Testnet Goerli.
	TotalDifficulty *BigInt                `protobuf:"bytes,17,opt,name=total_difficulty,json=totalDifficulty,proto3" json:"total_difficulty,omitempty"`
	Number          uint64                 `protobuf:"varint,9,opt,name=number,proto3" json:"number,omitempty"`
	GasLimit        uint64                 `protobuf:"varint,10,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"`
	GasUsed         uint64                 `protobuf:"varint,11,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"`
	Timestamp       *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// ExtraData is free-form bytes included in the block by the "miner". While on Yellow paper of
	// Ethereum this value is maxed to 32 bytes, other consensus algorithm like Clique and some other
	// forks are using bigger values to carry special consensus data.
	//
	// If the Block containing this `BlockHeader` has been produced using the Proof of Stake
	// consensus algorithm, this field is strictly enforced to be <= 32 bytes.
	ExtraData []byte `protobuf:"bytes,13,opt,name=extra_data,json=extraData,proto3" json:"extra_data,omitempty"`
	// MixHash is used to prove, when combined with the `nonce` that sufficient amount of computation has been
	// achieved and that the solution found is valid.
	MixHash []byte `protobuf:"bytes,14,opt,name=mix_hash,json=mixHash,proto3" json:"mix_hash,omitempty"`
	// Nonce is used to prove, when combined with the `mix_hash` that sufficient amount of computation has been
	// achieved and that the solution found is valid.
	//
	// If the Block containing this `BlockHeader` has been produced using the Proof of Stake
	// consensus algorithm, this field will actually be constant and set to `0`.
	Nonce uint64 `protobuf:"varint,15,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// Hash is the hash of the block which is actually the computation:
	//
	//  Keccak256(rlp([
	//    parent_hash,
	//    uncle_hash,
	//    coinbase,
	//    state_root,
	//    transactions_root,
	//    receipt_root,
	//    logs_bloom,
	//    difficulty,
	//    number,
	//    gas_limit,
	//    gas_used,
	//    timestamp,
	//    extra_data,
	//    mix_hash,
	//    nonce,
	//    base_fee_per_gas
	//  ]))
	//
	Hash []byte `protobuf:"bytes,16,opt,name=hash,proto3" json:"hash,omitempty"`
	// Base fee per gas according to EIP-1559 (e.g. London Fork) rules, only set if London is present/active on the chain.
	BaseFeePerGas *BigInt `protobuf:"bytes,18,opt,name=base_fee_per_gas,json=baseFeePerGas,proto3" json:"base_fee_per_gas,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockHeader) Descriptor deprecated

func (*BlockHeader) Descriptor() ([]byte, []int)

Deprecated: Use BlockHeader.ProtoReflect.Descriptor instead.

func (*BlockHeader) GetBaseFeePerGas

func (x *BlockHeader) GetBaseFeePerGas() *BigInt

func (*BlockHeader) GetCoinbase

func (x *BlockHeader) GetCoinbase() []byte

func (*BlockHeader) GetDifficulty

func (x *BlockHeader) GetDifficulty() *BigInt

func (*BlockHeader) GetExtraData

func (x *BlockHeader) GetExtraData() []byte

func (*BlockHeader) GetGasLimit

func (x *BlockHeader) GetGasLimit() uint64

func (*BlockHeader) GetGasUsed

func (x *BlockHeader) GetGasUsed() uint64

func (*BlockHeader) GetHash

func (x *BlockHeader) GetHash() []byte

func (*BlockHeader) GetLogsBloom

func (x *BlockHeader) GetLogsBloom() []byte

func (*BlockHeader) GetMixHash

func (x *BlockHeader) GetMixHash() []byte

func (*BlockHeader) GetNonce

func (x *BlockHeader) GetNonce() uint64

func (*BlockHeader) GetNumber

func (x *BlockHeader) GetNumber() uint64

func (*BlockHeader) GetParentHash

func (x *BlockHeader) GetParentHash() []byte

func (*BlockHeader) GetReceiptRoot

func (x *BlockHeader) GetReceiptRoot() []byte

func (*BlockHeader) GetStateRoot

func (x *BlockHeader) GetStateRoot() []byte

func (*BlockHeader) GetTimestamp

func (x *BlockHeader) GetTimestamp() *timestamppb.Timestamp

func (*BlockHeader) GetTotalDifficulty

func (x *BlockHeader) GetTotalDifficulty() *BigInt

func (*BlockHeader) GetTransactionsRoot

func (x *BlockHeader) GetTransactionsRoot() []byte

func (*BlockHeader) GetUncleHash

func (x *BlockHeader) GetUncleHash() []byte

func (*BlockHeader) ProtoMessage

func (*BlockHeader) ProtoMessage()

func (*BlockHeader) ProtoReflect

func (x *BlockHeader) ProtoReflect() protoreflect.Message

func (*BlockHeader) Reset

func (x *BlockHeader) Reset()

func (*BlockHeader) String

func (x *BlockHeader) String() string

type BlockRef

type BlockRef struct {
	Hash   []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Number uint64 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
	// contains filtered or unexported fields
}

func MustBlockRefAsProto

func MustBlockRefAsProto(ref bstream.BlockRef) *BlockRef

func (*BlockRef) AsBstreamBlockRef

func (b *BlockRef) AsBstreamBlockRef() bstream.BlockRef

func (*BlockRef) Descriptor deprecated

func (*BlockRef) Descriptor() ([]byte, []int)

Deprecated: Use BlockRef.ProtoReflect.Descriptor instead.

func (*BlockRef) GetHash

func (x *BlockRef) GetHash() []byte

func (*BlockRef) GetNumber

func (x *BlockRef) GetNumber() uint64

func (*BlockRef) ProtoMessage

func (*BlockRef) ProtoMessage()

func (*BlockRef) ProtoReflect

func (x *BlockRef) ProtoReflect() protoreflect.Message

func (*BlockRef) Reset

func (x *BlockRef) Reset()

func (*BlockRef) String

func (x *BlockRef) String() string

type BlockWithRefs

type BlockWithRefs struct {
	Id                   string           `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Block                *Block           `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"`
	TransactionTraceRefs *TransactionRefs `protobuf:"bytes,3,opt,name=transaction_trace_refs,json=transactionTraceRefs,proto3" json:"transaction_trace_refs,omitempty"`
	Irreversible         bool             `protobuf:"varint,4,opt,name=irreversible,proto3" json:"irreversible,omitempty"`
	// contains filtered or unexported fields
}

BlockWithRefs is a lightweight block, with traces and transactions purged from the `block` within, and only. It is used in transports to pass block data around.

func (*BlockWithRefs) Descriptor deprecated

func (*BlockWithRefs) Descriptor() ([]byte, []int)

Deprecated: Use BlockWithRefs.ProtoReflect.Descriptor instead.

func (*BlockWithRefs) GetBlock

func (x *BlockWithRefs) GetBlock() *Block

func (*BlockWithRefs) GetId

func (x *BlockWithRefs) GetId() string

func (*BlockWithRefs) GetIrreversible

func (x *BlockWithRefs) GetIrreversible() bool

func (*BlockWithRefs) GetTransactionTraceRefs

func (x *BlockWithRefs) GetTransactionTraceRefs() *TransactionRefs

func (*BlockWithRefs) ProtoMessage

func (*BlockWithRefs) ProtoMessage()

func (*BlockWithRefs) ProtoReflect

func (x *BlockWithRefs) ProtoReflect() protoreflect.Message

func (*BlockWithRefs) Reset

func (x *BlockWithRefs) Reset()

func (*BlockWithRefs) String

func (x *BlockWithRefs) String() string

type Call

type Call struct {
	Index        uint32   `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	ParentIndex  uint32   `protobuf:"varint,2,opt,name=parent_index,json=parentIndex,proto3" json:"parent_index,omitempty"`
	Depth        uint32   `protobuf:"varint,3,opt,name=depth,proto3" json:"depth,omitempty"`
	CallType     CallType `protobuf:"varint,4,opt,name=call_type,json=callType,proto3,enum=sf.ethereum.type.v2.CallType" json:"call_type,omitempty"`
	Caller       []byte   `protobuf:"bytes,5,opt,name=caller,proto3" json:"caller,omitempty"`
	Address      []byte   `protobuf:"bytes,6,opt,name=address,proto3" json:"address,omitempty"`
	Value        *BigInt  `protobuf:"bytes,7,opt,name=value,proto3" json:"value,omitempty"`
	GasLimit     uint64   `protobuf:"varint,8,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"`
	GasConsumed  uint64   `protobuf:"varint,9,opt,name=gas_consumed,json=gasConsumed,proto3" json:"gas_consumed,omitempty"`
	ReturnData   []byte   `protobuf:"bytes,13,opt,name=return_data,json=returnData,proto3" json:"return_data,omitempty"`
	Input        []byte   `protobuf:"bytes,14,opt,name=input,proto3" json:"input,omitempty"`
	ExecutedCode bool     `protobuf:"varint,15,opt,name=executed_code,json=executedCode,proto3" json:"executed_code,omitempty"`
	Suicide      bool     `protobuf:"varint,16,opt,name=suicide,proto3" json:"suicide,omitempty"`
	// hex representation of the hash -> preimage
	KeccakPreimages map[string]string `` /* 195-byte string literal not displayed */
	StorageChanges  []*StorageChange  `protobuf:"bytes,21,rep,name=storage_changes,json=storageChanges,proto3" json:"storage_changes,omitempty"`
	BalanceChanges  []*BalanceChange  `protobuf:"bytes,22,rep,name=balance_changes,json=balanceChanges,proto3" json:"balance_changes,omitempty"`
	NonceChanges    []*NonceChange    `protobuf:"bytes,24,rep,name=nonce_changes,json=nonceChanges,proto3" json:"nonce_changes,omitempty"`
	Logs            []*Log            `protobuf:"bytes,25,rep,name=logs,proto3" json:"logs,omitempty"`
	CodeChanges     []*CodeChange     `protobuf:"bytes,26,rep,name=code_changes,json=codeChanges,proto3" json:"code_changes,omitempty"`
	GasChanges      []*GasChange      `protobuf:"bytes,28,rep,name=gas_changes,json=gasChanges,proto3" json:"gas_changes,omitempty"`
	// In Ethereum, a call can be either:
	// - Successfull, execution passes without any problem encountered
	// - Failed, execution failed, and remaining gas should be consumed
	// - Reverted, execution failed, but only gas consumed so far is billed, remaining gas is refunded
	//
	// When a call is either `failed` or `reverted`, the `status_failed` field
	// below is set to `true`. If the status is `reverted`, then both `status_failed`
	// and `status_reverted` are going to be set to `true`.
	StatusFailed   bool `protobuf:"varint,10,opt,name=status_failed,json=statusFailed,proto3" json:"status_failed,omitempty"`
	StatusReverted bool `protobuf:"varint,12,opt,name=status_reverted,json=statusReverted,proto3" json:"status_reverted,omitempty"`
	// Populated when a call either failed or reverted, so when `status_failed == true`,
	// see above for details about those flags.
	FailureReason string `protobuf:"bytes,11,opt,name=failure_reason,json=failureReason,proto3" json:"failure_reason,omitempty"`
	// This field represents wheter or not the state changes performed
	// by this call were correctly recorded by the blockchain.
	//
	// On Ethereum, a transaction can record state changes even if some
	// of its inner nested calls failed. This is problematic however since
	// a call will invalidate all its state changes as well as all state
	// changes performed by its child call. This means that even if a call
	// has a status of `SUCCESS`, the chain might have reverted all the state
	// changes it performed.
	//
	// “`text
	//   Trx 1
	//    Call #1 <Failed>
	//      Call #2 <Execution Success>
	//      Call #3 <Execution Success>
	//      |--- Failure here
	//    Call #4
	// “`
	//
	// In the transaction above, while Call #2 and Call #3 would have the
	// status `EXECUTED`
	StateReverted    bool               `protobuf:"varint,30,opt,name=state_reverted,json=stateReverted,proto3" json:"state_reverted,omitempty"`
	BeginOrdinal     uint64             `protobuf:"varint,31,opt,name=begin_ordinal,json=beginOrdinal,proto3" json:"begin_ordinal,omitempty"`
	EndOrdinal       uint64             `protobuf:"varint,32,opt,name=end_ordinal,json=endOrdinal,proto3" json:"end_ordinal,omitempty"`
	AccountCreations []*AccountCreation `protobuf:"bytes,33,rep,name=account_creations,json=accountCreations,proto3" json:"account_creations,omitempty"`
	// contains filtered or unexported fields
}

func (*Call) Descriptor deprecated

func (*Call) Descriptor() ([]byte, []int)

Deprecated: Use Call.ProtoReflect.Descriptor instead.

func (*Call) GetAccountCreations

func (x *Call) GetAccountCreations() []*AccountCreation

func (*Call) GetAddress

func (x *Call) GetAddress() []byte

func (*Call) GetBalanceChanges

func (x *Call) GetBalanceChanges() []*BalanceChange

func (*Call) GetBeginOrdinal

func (x *Call) GetBeginOrdinal() uint64

func (*Call) GetCallType

func (x *Call) GetCallType() CallType

func (*Call) GetCaller

func (x *Call) GetCaller() []byte

func (*Call) GetCodeChanges

func (x *Call) GetCodeChanges() []*CodeChange

func (*Call) GetDepth

func (x *Call) GetDepth() uint32

func (*Call) GetEndOrdinal

func (x *Call) GetEndOrdinal() uint64

func (*Call) GetExecutedCode

func (x *Call) GetExecutedCode() bool

func (*Call) GetFailureReason

func (x *Call) GetFailureReason() string

func (*Call) GetGasChanges

func (x *Call) GetGasChanges() []*GasChange

func (*Call) GetGasConsumed

func (x *Call) GetGasConsumed() uint64

func (*Call) GetGasLimit

func (x *Call) GetGasLimit() uint64

func (*Call) GetIndex

func (x *Call) GetIndex() uint32

func (*Call) GetInput

func (x *Call) GetInput() []byte

func (*Call) GetKeccakPreimages

func (x *Call) GetKeccakPreimages() map[string]string

func (*Call) GetLogs

func (x *Call) GetLogs() []*Log

func (*Call) GetNonceChanges

func (x *Call) GetNonceChanges() []*NonceChange

func (*Call) GetParentIndex

func (x *Call) GetParentIndex() uint32

func (*Call) GetReturnData

func (x *Call) GetReturnData() []byte

func (*Call) GetStateReverted

func (x *Call) GetStateReverted() bool

func (*Call) GetStatusFailed

func (x *Call) GetStatusFailed() bool

func (*Call) GetStatusReverted

func (x *Call) GetStatusReverted() bool

func (*Call) GetStorageChanges

func (x *Call) GetStorageChanges() []*StorageChange

func (*Call) GetSuicide

func (x *Call) GetSuicide() bool

func (*Call) GetValue

func (x *Call) GetValue() *BigInt

func (*Call) Method

func (call *Call) Method() []byte

func (*Call) ProtoMessage

func (*Call) ProtoMessage()

func (*Call) ProtoReflect

func (x *Call) ProtoReflect() protoreflect.Message

func (*Call) Reset

func (x *Call) Reset()

func (*Call) String

func (x *Call) String() string

type CallType

type CallType int32
const (
	CallType_UNSPECIFIED CallType = 0
	CallType_CALL        CallType = 1 // direct? what's the name for `Call` alone?
	CallType_CALLCODE    CallType = 2
	CallType_DELEGATE    CallType = 3
	CallType_STATIC      CallType = 4
	CallType_CREATE      CallType = 5 // create2 ? any other form of calls?
)

func (CallType) Descriptor

func (CallType) Descriptor() protoreflect.EnumDescriptor

func (CallType) Enum

func (x CallType) Enum() *CallType

func (CallType) EnumDescriptor deprecated

func (CallType) EnumDescriptor() ([]byte, []int)

Deprecated: Use CallType.Descriptor instead.

func (CallType) Number

func (x CallType) Number() protoreflect.EnumNumber

func (CallType) String

func (x CallType) String() string

func (CallType) Type

type CodeChange

type CodeChange struct {
	Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	OldHash []byte `protobuf:"bytes,2,opt,name=old_hash,json=oldHash,proto3" json:"old_hash,omitempty"`
	OldCode []byte `protobuf:"bytes,3,opt,name=old_code,json=oldCode,proto3" json:"old_code,omitempty"`
	NewHash []byte `protobuf:"bytes,4,opt,name=new_hash,json=newHash,proto3" json:"new_hash,omitempty"`
	NewCode []byte `protobuf:"bytes,5,opt,name=new_code,json=newCode,proto3" json:"new_code,omitempty"`
	Ordinal uint64 `protobuf:"varint,6,opt,name=ordinal,proto3" json:"ordinal,omitempty"`
	// contains filtered or unexported fields
}

func (*CodeChange) Descriptor deprecated

func (*CodeChange) Descriptor() ([]byte, []int)

Deprecated: Use CodeChange.ProtoReflect.Descriptor instead.

func (*CodeChange) GetAddress

func (x *CodeChange) GetAddress() []byte

func (*CodeChange) GetNewCode

func (x *CodeChange) GetNewCode() []byte

func (*CodeChange) GetNewHash

func (x *CodeChange) GetNewHash() []byte

func (*CodeChange) GetOldCode

func (x *CodeChange) GetOldCode() []byte

func (*CodeChange) GetOldHash

func (x *CodeChange) GetOldHash() []byte

func (*CodeChange) GetOrdinal

func (x *CodeChange) GetOrdinal() uint64

func (*CodeChange) ProtoMessage

func (*CodeChange) ProtoMessage()

func (*CodeChange) ProtoReflect

func (x *CodeChange) ProtoReflect() protoreflect.Message

func (*CodeChange) Reset

func (x *CodeChange) Reset()

func (*CodeChange) String

func (x *CodeChange) String() string

type GasChange

type GasChange struct {
	OldValue uint64           `protobuf:"varint,1,opt,name=old_value,json=oldValue,proto3" json:"old_value,omitempty"`
	NewValue uint64           `protobuf:"varint,2,opt,name=new_value,json=newValue,proto3" json:"new_value,omitempty"`
	Reason   GasChange_Reason `protobuf:"varint,3,opt,name=reason,proto3,enum=sf.ethereum.type.v2.GasChange_Reason" json:"reason,omitempty"`
	Ordinal  uint64           `protobuf:"varint,4,opt,name=ordinal,proto3" json:"ordinal,omitempty"`
	// contains filtered or unexported fields
}

The gas change model represents the reason why some gas cost has occurred. The gas is computed per actual op codes. Doing them completely might prove overwhelming in most cases.

Hence, we only index some of them, those that are costy like all the calls one, log events, return data, etc.

func (*GasChange) Descriptor deprecated

func (*GasChange) Descriptor() ([]byte, []int)

Deprecated: Use GasChange.ProtoReflect.Descriptor instead.

func (*GasChange) GetNewValue

func (x *GasChange) GetNewValue() uint64

func (*GasChange) GetOldValue

func (x *GasChange) GetOldValue() uint64

func (*GasChange) GetOrdinal

func (x *GasChange) GetOrdinal() uint64

func (*GasChange) GetReason

func (x *GasChange) GetReason() GasChange_Reason

func (*GasChange) ProtoMessage

func (*GasChange) ProtoMessage()

func (*GasChange) ProtoReflect

func (x *GasChange) ProtoReflect() protoreflect.Message

func (*GasChange) Reset

func (x *GasChange) Reset()

func (*GasChange) String

func (x *GasChange) String() string

type GasChange_Reason

type GasChange_Reason int32

Obtain all gas change reasons under deep mind repository:

```shell ack -ho 'GasChangeReason\(".*"\)' | grep -Eo '".*"' | sort | uniq ```

const (
	GasChange_REASON_UNKNOWN                GasChange_Reason = 0
	GasChange_REASON_CALL                   GasChange_Reason = 1
	GasChange_REASON_CALL_CODE              GasChange_Reason = 2
	GasChange_REASON_CALL_DATA_COPY         GasChange_Reason = 3
	GasChange_REASON_CODE_COPY              GasChange_Reason = 4
	GasChange_REASON_CODE_STORAGE           GasChange_Reason = 5
	GasChange_REASON_CONTRACT_CREATION      GasChange_Reason = 6
	GasChange_REASON_CONTRACT_CREATION2     GasChange_Reason = 7
	GasChange_REASON_DELEGATE_CALL          GasChange_Reason = 8
	GasChange_REASON_EVENT_LOG              GasChange_Reason = 9
	GasChange_REASON_EXT_CODE_COPY          GasChange_Reason = 10
	GasChange_REASON_FAILED_EXECUTION       GasChange_Reason = 11
	GasChange_REASON_INTRINSIC_GAS          GasChange_Reason = 12
	GasChange_REASON_PRECOMPILED_CONTRACT   GasChange_Reason = 13
	GasChange_REASON_REFUND_AFTER_EXECUTION GasChange_Reason = 14
	GasChange_REASON_RETURN                 GasChange_Reason = 15
	GasChange_REASON_RETURN_DATA_COPY       GasChange_Reason = 16
	GasChange_REASON_REVERT                 GasChange_Reason = 17
	GasChange_REASON_SELF_DESTRUCT          GasChange_Reason = 18
	GasChange_REASON_STATIC_CALL            GasChange_Reason = 19
	// Added in Berlin fork (Geth 1.10+)
	GasChange_REASON_STATE_COLD_ACCESS GasChange_Reason = 20
)

func MustGasChangeReasonFromString

func MustGasChangeReasonFromString(reason string) GasChange_Reason

func (GasChange_Reason) Descriptor

func (GasChange_Reason) Enum

func (GasChange_Reason) EnumDescriptor deprecated

func (GasChange_Reason) EnumDescriptor() ([]byte, []int)

Deprecated: Use GasChange_Reason.Descriptor instead.

func (GasChange_Reason) Number

func (GasChange_Reason) String

func (x GasChange_Reason) String() string

func (GasChange_Reason) Type

type HeaderOnlyBlock

type HeaderOnlyBlock struct {
	Header *BlockHeader `protobuf:"bytes,5,opt,name=header,proto3" json:"header,omitempty"`
	// contains filtered or unexported fields
}

HeaderOnlyBlock is used to optimally unpack the Block structure (note the corresponding message number for the `header` field) while consuming less memory, when only the `header` is desired.

WARN: this is a client-side optimization pattern and should be moved in the consuming code.

func (*HeaderOnlyBlock) Descriptor deprecated

func (*HeaderOnlyBlock) Descriptor() ([]byte, []int)

Deprecated: Use HeaderOnlyBlock.ProtoReflect.Descriptor instead.

func (*HeaderOnlyBlock) GetHeader

func (x *HeaderOnlyBlock) GetHeader() *BlockHeader

func (*HeaderOnlyBlock) ProtoMessage

func (*HeaderOnlyBlock) ProtoMessage()

func (*HeaderOnlyBlock) ProtoReflect

func (x *HeaderOnlyBlock) ProtoReflect() protoreflect.Message

func (*HeaderOnlyBlock) Reset

func (x *HeaderOnlyBlock) Reset()

func (*HeaderOnlyBlock) String

func (x *HeaderOnlyBlock) String() string

type Log

type Log struct {
	Address []byte   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Topics  [][]byte `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"`
	Data    []byte   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// Index is the index of the log relative to the transaction. This index
	// is always populated regardless of the state revertion of the the call
	// that emitted this log.
	Index uint32 `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"`
	// BlockIndex represents the index of the log relative to the Block.
	//
	// An **important** notice is that this field will be 0 when the call
	// that emitted the log has been reverted by the chain.
	//
	// Currently, there is two locations where a Log can be obtained:
	// - block.transaction_traces[].receipt.logs[]
	// - block.transaction_traces[].calls[].logs[]
	//
	// In the `receipt` case, the logs will be populated only when the call
	// that emitted them has not been reverted by the chain and when in this
	// position, the `blockIndex` is always populated correctly.
	//
	// In the case of `calls` case, for `call` where `stateReverted == true`,
	// the `blockIndex` value will always be 0.
	BlockIndex uint32 `protobuf:"varint,6,opt,name=blockIndex,proto3" json:"blockIndex,omitempty"`
	Ordinal    uint64 `protobuf:"varint,7,opt,name=ordinal,proto3" json:"ordinal,omitempty"`
	// contains filtered or unexported fields
}

func (*Log) Descriptor deprecated

func (*Log) Descriptor() ([]byte, []int)

Deprecated: Use Log.ProtoReflect.Descriptor instead.

func (*Log) GetAddress

func (x *Log) GetAddress() []byte

func (*Log) GetBlockIndex

func (x *Log) GetBlockIndex() uint32

func (*Log) GetData

func (x *Log) GetData() []byte

func (*Log) GetIndex

func (x *Log) GetIndex() uint32

func (*Log) GetOrdinal

func (x *Log) GetOrdinal() uint64

func (*Log) GetTopics

func (x *Log) GetTopics() [][]byte

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) ProtoReflect

func (x *Log) ProtoReflect() protoreflect.Message

func (*Log) Reset

func (x *Log) Reset()

func (*Log) String

func (x *Log) String() string

type NonceChange

type NonceChange struct {
	Address  []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	OldValue uint64 `protobuf:"varint,2,opt,name=old_value,json=oldValue,proto3" json:"old_value,omitempty"`
	NewValue uint64 `protobuf:"varint,3,opt,name=new_value,json=newValue,proto3" json:"new_value,omitempty"`
	Ordinal  uint64 `protobuf:"varint,4,opt,name=ordinal,proto3" json:"ordinal,omitempty"`
	// contains filtered or unexported fields
}

func (*NonceChange) Descriptor deprecated

func (*NonceChange) Descriptor() ([]byte, []int)

Deprecated: Use NonceChange.ProtoReflect.Descriptor instead.

func (*NonceChange) GetAddress

func (x *NonceChange) GetAddress() []byte

func (*NonceChange) GetNewValue

func (x *NonceChange) GetNewValue() uint64

func (*NonceChange) GetOldValue

func (x *NonceChange) GetOldValue() uint64

func (*NonceChange) GetOrdinal

func (x *NonceChange) GetOrdinal() uint64

func (*NonceChange) ProtoMessage

func (*NonceChange) ProtoMessage()

func (*NonceChange) ProtoReflect

func (x *NonceChange) ProtoReflect() protoreflect.Message

func (*NonceChange) Reset

func (x *NonceChange) Reset()

func (*NonceChange) String

func (x *NonceChange) String() string

type StorageChange

type StorageChange struct {
	Address  []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Key      []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	OldValue []byte `protobuf:"bytes,3,opt,name=old_value,json=oldValue,proto3" json:"old_value,omitempty"`
	NewValue []byte `protobuf:"bytes,4,opt,name=new_value,json=newValue,proto3" json:"new_value,omitempty"`
	Ordinal  uint64 `protobuf:"varint,5,opt,name=ordinal,proto3" json:"ordinal,omitempty"`
	// contains filtered or unexported fields
}

func (*StorageChange) Descriptor deprecated

func (*StorageChange) Descriptor() ([]byte, []int)

Deprecated: Use StorageChange.ProtoReflect.Descriptor instead.

func (*StorageChange) GetAddress

func (x *StorageChange) GetAddress() []byte

func (*StorageChange) GetKey

func (x *StorageChange) GetKey() []byte

func (*StorageChange) GetNewValue

func (x *StorageChange) GetNewValue() []byte

func (*StorageChange) GetOldValue

func (x *StorageChange) GetOldValue() []byte

func (*StorageChange) GetOrdinal

func (x *StorageChange) GetOrdinal() uint64

func (*StorageChange) ProtoMessage

func (*StorageChange) ProtoMessage()

func (*StorageChange) ProtoReflect

func (x *StorageChange) ProtoReflect() protoreflect.Message

func (*StorageChange) Reset

func (x *StorageChange) Reset()

func (*StorageChange) String

func (x *StorageChange) String() string

type TransactionReceipt

type TransactionReceipt struct {

	// State root is an intermediate state_root hash, computed in-between transactions to make
	// **sure** you could build a proof and point to state in the middle of a block. Geth client
	// uses `PostState + root + PostStateOrStatus“ while Parity used `status_code, root...“ this piles
	// hardforks, see (read the EIPs first):
	// - https://github.com/ethereum/EIPs/blob/master/EIPS/eip-658.md
	//
	// Moreover, the notion of `Outcome“ in parity, which segregates the two concepts, which are
	// stored in the same field `status_code“ can be computed based on such a hack of the `state_root`
	// field, following `EIP-658`.
	//
	// Before Byzantinium hard fork, this field is always empty.
	StateRoot         []byte `protobuf:"bytes,1,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"`
	CumulativeGasUsed uint64 `protobuf:"varint,2,opt,name=cumulative_gas_used,json=cumulativeGasUsed,proto3" json:"cumulative_gas_used,omitempty"`
	LogsBloom         []byte `protobuf:"bytes,3,opt,name=logs_bloom,json=logsBloom,proto3" json:"logs_bloom,omitempty"`
	Logs              []*Log `protobuf:"bytes,4,rep,name=logs,proto3" json:"logs,omitempty"`
	// contains filtered or unexported fields
}

func (*TransactionReceipt) Descriptor deprecated

func (*TransactionReceipt) Descriptor() ([]byte, []int)

Deprecated: Use TransactionReceipt.ProtoReflect.Descriptor instead.

func (*TransactionReceipt) GetCumulativeGasUsed

func (x *TransactionReceipt) GetCumulativeGasUsed() uint64

func (*TransactionReceipt) GetLogs

func (x *TransactionReceipt) GetLogs() []*Log

func (*TransactionReceipt) GetLogsBloom

func (x *TransactionReceipt) GetLogsBloom() []byte

func (*TransactionReceipt) GetStateRoot

func (x *TransactionReceipt) GetStateRoot() []byte

func (*TransactionReceipt) ProtoMessage

func (*TransactionReceipt) ProtoMessage()

func (*TransactionReceipt) ProtoReflect

func (x *TransactionReceipt) ProtoReflect() protoreflect.Message

func (*TransactionReceipt) Reset

func (x *TransactionReceipt) Reset()

func (*TransactionReceipt) String

func (x *TransactionReceipt) String() string

type TransactionRefs

type TransactionRefs struct {
	Hashes [][]byte `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"`
	// contains filtered or unexported fields
}

func (*TransactionRefs) Descriptor deprecated

func (*TransactionRefs) Descriptor() ([]byte, []int)

Deprecated: Use TransactionRefs.ProtoReflect.Descriptor instead.

func (*TransactionRefs) GetHashes

func (x *TransactionRefs) GetHashes() [][]byte

func (*TransactionRefs) ProtoMessage

func (*TransactionRefs) ProtoMessage()

func (*TransactionRefs) ProtoReflect

func (x *TransactionRefs) ProtoReflect() protoreflect.Message

func (*TransactionRefs) Reset

func (x *TransactionRefs) Reset()

func (*TransactionRefs) String

func (x *TransactionRefs) String() string

type TransactionTrace

type TransactionTrace struct {

	// consensus
	To    []byte `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"`
	Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// GasPrice represents the effective price that has been paid for each gas unit of this transaction. Over time, the
	// Ethereum rules changes regarding GasPrice field here. Before London fork, the GasPrice was always set to the
	// fixed gas price. After London fork, this value has different meaning depending on the transaction type (see `Type` field).
	//
	// In cases where `TransactionTrace.Type == TRX_TYPE_LEGACY || TRX_TYPE_ACCESS_LIST`, then GasPrice has the same meaning
	// as before the London fork.
	//
	// In cases where `TransactionTrace.Type == TRX_TYPE_DYNAMIC_FEE`, then GasPrice is the effective gas price paid
	// for the transaction which is equals to `BlockHeader.BaseFeePerGas + TransactionTrace.`
	GasPrice *BigInt `protobuf:"bytes,3,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"`
	// GasLimit is the maximum of gas unit the sender of the transaction is willing to consume when perform the EVM
	// execution of the whole transaction
	GasLimit uint64 `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"`
	// Value is the amount of Ether transferred as part of this transaction.
	Value *BigInt `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"`
	// Input data the transaction will receive for execution of EVM.
	Input []byte `protobuf:"bytes,6,opt,name=input,proto3" json:"input,omitempty"`
	// V is the recovery ID value for the signature Y point.
	V []byte `protobuf:"bytes,7,opt,name=v,proto3" json:"v,omitempty"`
	// R is the signature's X point on the elliptic curve (32 bytes).
	R []byte `protobuf:"bytes,8,opt,name=r,proto3" json:"r,omitempty"`
	// S is the signature's Y point on the elliptic curve (32 bytes).
	S []byte `protobuf:"bytes,9,opt,name=s,proto3" json:"s,omitempty"`
	// GasUsed is the total amount of gas unit used for the whole execution of the transaction.
	GasUsed uint64 `protobuf:"varint,10,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"`
	// Type represents the Ethereum transaction type, available only since EIP-2718 & EIP-2930 activation which happened on Berlin fork.
	// The value is always set even for transaction before Berlin fork because those before the fork are still legacy transactions.
	Type TransactionTrace_Type `protobuf:"varint,12,opt,name=type,proto3,enum=sf.ethereum.type.v2.TransactionTrace_Type" json:"type,omitempty"`
	// AcccessList represents the storage access this transaction has agreed to do in which case those storage
	// access cost less gas unit per access.
	//
	// This will is populated only if `TransactionTrace.Type == TRX_TYPE_ACCESS_LIST || TRX_TYPE_DYNAMIC_FEE` which
	// is possible only if Berlin (TRX_TYPE_ACCESS_LIST) nor London (TRX_TYPE_DYNAMIC_FEE) fork are active on the chain.
	AccessList []*AccessTuple `protobuf:"bytes,14,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"`
	// MaxFeePerGas is the maximum fee per gas the user is willing to pay for the transaction gas used.
	//
	// This will is populated only if `TransactionTrace.Type == TRX_TYPE_DYNAMIC_FEE` which is possible only
	// if Londong fork is active on the chain.
	MaxFeePerGas *BigInt `protobuf:"bytes,11,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"`
	// MaxPriorityFeePerGas is priority fee per gas the user to pay in extra to the miner on top of the block's
	// base fee.
	//
	// This will is populated only if `TransactionTrace.Type == TRX_TYPE_DYNAMIC_FEE` which is possible only
	// if Londong fork is active on the chain.
	MaxPriorityFeePerGas *BigInt `` /* 128-byte string literal not displayed */
	// meta
	Index        uint32                 `protobuf:"varint,20,opt,name=index,proto3" json:"index,omitempty"`
	Hash         []byte                 `protobuf:"bytes,21,opt,name=hash,proto3" json:"hash,omitempty"`
	From         []byte                 `protobuf:"bytes,22,opt,name=from,proto3" json:"from,omitempty"`
	ReturnData   []byte                 `protobuf:"bytes,23,opt,name=return_data,json=returnData,proto3" json:"return_data,omitempty"`
	PublicKey    []byte                 `protobuf:"bytes,24,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	BeginOrdinal uint64                 `protobuf:"varint,25,opt,name=begin_ordinal,json=beginOrdinal,proto3" json:"begin_ordinal,omitempty"`
	EndOrdinal   uint64                 `protobuf:"varint,26,opt,name=end_ordinal,json=endOrdinal,proto3" json:"end_ordinal,omitempty"`
	Status       TransactionTraceStatus `protobuf:"varint,30,opt,name=status,proto3,enum=sf.ethereum.type.v2.TransactionTraceStatus" json:"status,omitempty"`
	Receipt      *TransactionReceipt    `protobuf:"bytes,31,opt,name=receipt,proto3" json:"receipt,omitempty"`
	Calls        []*Call                `protobuf:"bytes,32,rep,name=calls,proto3" json:"calls,omitempty"`
	// contains filtered or unexported fields
}

func (*TransactionTrace) Descriptor deprecated

func (*TransactionTrace) Descriptor() ([]byte, []int)

Deprecated: Use TransactionTrace.ProtoReflect.Descriptor instead.

func (*TransactionTrace) GetAccessList

func (x *TransactionTrace) GetAccessList() []*AccessTuple

func (*TransactionTrace) GetBeginOrdinal

func (x *TransactionTrace) GetBeginOrdinal() uint64

func (*TransactionTrace) GetCalls

func (x *TransactionTrace) GetCalls() []*Call

func (*TransactionTrace) GetEndOrdinal

func (x *TransactionTrace) GetEndOrdinal() uint64

func (*TransactionTrace) GetFrom

func (x *TransactionTrace) GetFrom() []byte

func (*TransactionTrace) GetGasLimit

func (x *TransactionTrace) GetGasLimit() uint64

func (*TransactionTrace) GetGasPrice

func (x *TransactionTrace) GetGasPrice() *BigInt

func (*TransactionTrace) GetGasUsed

func (x *TransactionTrace) GetGasUsed() uint64

func (*TransactionTrace) GetHash

func (x *TransactionTrace) GetHash() []byte

func (*TransactionTrace) GetIndex

func (x *TransactionTrace) GetIndex() uint32

func (*TransactionTrace) GetInput

func (x *TransactionTrace) GetInput() []byte

func (*TransactionTrace) GetMaxFeePerGas

func (x *TransactionTrace) GetMaxFeePerGas() *BigInt

func (*TransactionTrace) GetMaxPriorityFeePerGas

func (x *TransactionTrace) GetMaxPriorityFeePerGas() *BigInt

func (*TransactionTrace) GetNonce

func (x *TransactionTrace) GetNonce() uint64

func (*TransactionTrace) GetPublicKey

func (x *TransactionTrace) GetPublicKey() []byte

func (*TransactionTrace) GetR

func (x *TransactionTrace) GetR() []byte

func (*TransactionTrace) GetReceipt

func (x *TransactionTrace) GetReceipt() *TransactionReceipt

func (*TransactionTrace) GetReturnData

func (x *TransactionTrace) GetReturnData() []byte

func (*TransactionTrace) GetS

func (x *TransactionTrace) GetS() []byte

func (*TransactionTrace) GetStatus

func (*TransactionTrace) GetTo

func (x *TransactionTrace) GetTo() []byte

func (*TransactionTrace) GetType

func (*TransactionTrace) GetV

func (x *TransactionTrace) GetV() []byte

func (*TransactionTrace) GetValue

func (x *TransactionTrace) GetValue() *BigInt

func (*TransactionTrace) PopulateStateReverted

func (trace *TransactionTrace) PopulateStateReverted()

func (*TransactionTrace) PopulateTrxStatus

func (trace *TransactionTrace) PopulateTrxStatus()

func (*TransactionTrace) ProtoMessage

func (*TransactionTrace) ProtoMessage()

func (*TransactionTrace) ProtoReflect

func (x *TransactionTrace) ProtoReflect() protoreflect.Message

func (*TransactionTrace) Reset

func (x *TransactionTrace) Reset()

func (*TransactionTrace) String

func (x *TransactionTrace) String() string

type TransactionTraceStatus

type TransactionTraceStatus int32
const (
	TransactionTraceStatus_UNKNOWN   TransactionTraceStatus = 0
	TransactionTraceStatus_SUCCEEDED TransactionTraceStatus = 1
	TransactionTraceStatus_FAILED    TransactionTraceStatus = 2
	TransactionTraceStatus_REVERTED  TransactionTraceStatus = 3
)

func (TransactionTraceStatus) Descriptor

func (TransactionTraceStatus) Enum

func (TransactionTraceStatus) EnumDescriptor deprecated

func (TransactionTraceStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use TransactionTraceStatus.Descriptor instead.

func (TransactionTraceStatus) Number

func (TransactionTraceStatus) String

func (x TransactionTraceStatus) String() string

func (TransactionTraceStatus) Type

type TransactionTraceWithBlockRef

type TransactionTraceWithBlockRef struct {
	Trace    *TransactionTrace `protobuf:"bytes,1,opt,name=trace,proto3" json:"trace,omitempty"`
	BlockRef *BlockRef         `protobuf:"bytes,2,opt,name=block_ref,json=blockRef,proto3" json:"block_ref,omitempty"`
	// contains filtered or unexported fields
}

TransactionTraceWithBlockRef

func (*TransactionTraceWithBlockRef) Descriptor deprecated

func (*TransactionTraceWithBlockRef) Descriptor() ([]byte, []int)

Deprecated: Use TransactionTraceWithBlockRef.ProtoReflect.Descriptor instead.

func (*TransactionTraceWithBlockRef) GetBlockRef

func (x *TransactionTraceWithBlockRef) GetBlockRef() *BlockRef

func (*TransactionTraceWithBlockRef) GetTrace

func (*TransactionTraceWithBlockRef) ProtoMessage

func (*TransactionTraceWithBlockRef) ProtoMessage()

func (*TransactionTraceWithBlockRef) ProtoReflect

func (*TransactionTraceWithBlockRef) Reset

func (x *TransactionTraceWithBlockRef) Reset()

func (*TransactionTraceWithBlockRef) String

type TransactionTrace_Type

type TransactionTrace_Type int32
const (
	// All transactions that ever existed prior Berlin fork before EIP-2718 was implemented.
	TransactionTrace_TRX_TYPE_LEGACY TransactionTrace_Type = 0
	// Transaction that specicy an access list of contract/storage_keys that is going to be used
	// in this transaction.
	//
	// Added in Berlin fork (EIP-2930).
	TransactionTrace_TRX_TYPE_ACCESS_LIST TransactionTrace_Type = 1
	// Transaction that specifis an access list just like TRX_TYPE_ACCESS_LIST but in addition defines the
	// max base gas gee and max priority gas fee to pay for this transaction. Transaction's of those type are
	// executed against EIP-1559 rules which dictates a dynamic gas cost based on the congestion of the network.
	TransactionTrace_TRX_TYPE_DYNAMIC_FEE TransactionTrace_Type = 2
)

func (TransactionTrace_Type) Descriptor

func (TransactionTrace_Type) Enum

func (TransactionTrace_Type) EnumDescriptor deprecated

func (TransactionTrace_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use TransactionTrace_Type.Descriptor instead.

func (TransactionTrace_Type) Number

func (TransactionTrace_Type) String

func (x TransactionTrace_Type) String() string

func (TransactionTrace_Type) Type

type UnclesHeaders

type UnclesHeaders struct {
	Uncles []*BlockHeader `protobuf:"bytes,1,rep,name=uncles,proto3" json:"uncles,omitempty"`
	// contains filtered or unexported fields
}

func (*UnclesHeaders) Descriptor deprecated

func (*UnclesHeaders) Descriptor() ([]byte, []int)

Deprecated: Use UnclesHeaders.ProtoReflect.Descriptor instead.

func (*UnclesHeaders) GetUncles

func (x *UnclesHeaders) GetUncles() []*BlockHeader

func (*UnclesHeaders) ProtoMessage

func (*UnclesHeaders) ProtoMessage()

func (*UnclesHeaders) ProtoReflect

func (x *UnclesHeaders) ProtoReflect() protoreflect.Message

func (*UnclesHeaders) Reset

func (x *UnclesHeaders) Reset()

func (*UnclesHeaders) String

func (x *UnclesHeaders) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL