ethtx

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)

Functions

func DecodeSignature

func DecodeSignature(sig []byte) (r, s, v *big.Int, err error)

func EffectiveGasPrice

func EffectiveGasPrice(baseFee, feeCap, tipCap *big.Int) *big.Int

Effective gas price is the smaller of base fee + tip limit vs total fee limit

func IsValidInt256

func IsValidInt256(i *big.Int) bool

IsValidInt256 check the bound of 256 bit number

func SetConvertIfPresent

func SetConvertIfPresent[U comparable, V any](orig U, converter func(U) V, setter func(V))

Convert a value with the provided converter and set it using the provided setter

func ValidateAddress

func ValidateAddress(address string) error

address is validate if it is a hex string (case insensitive) of length 40. It may optionally have a '0x' or '0X' prefix.

func ValidateEthTx

func ValidateEthTx(tx *ethtypes.Transaction) error

validate a ethtypes.Transaction for sdk.Int overflow

Types

type AccessList

type AccessList []AccessTuple

func NewAccessList

func NewAccessList(ethAccessList *ethtypes.AccessList) AccessList

func (AccessList) ToEthAccessList

func (al AccessList) ToEthAccessList() *ethtypes.AccessList

type AccessListTx

type AccessListTx struct {
	ChainID  *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"chainID"`
	Nonce    uint64                                  `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	GasPrice *github_com_cosmos_cosmos_sdk_types.Int `` /* 135-byte string literal not displayed */
	GasLimit uint64                                  `protobuf:"varint,4,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"`
	To       string                                  `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"`
	Amount   *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value,omitempty"`
	Data     []byte                                  `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"`
	Accesses AccessList                              `protobuf:"bytes,8,rep,name=accesses,proto3,castrepeated=AccessList" json:"accessList"`
	// signature values
	V []byte `protobuf:"bytes,9,opt,name=v,proto3" json:"v,omitempty"`
	R []byte `protobuf:"bytes,10,opt,name=r,proto3" json:"r,omitempty"`
	S []byte `protobuf:"bytes,11,opt,name=s,proto3" json:"s,omitempty"`
}

func NewAccessListTx

func NewAccessListTx(tx *ethtypes.Transaction) (*AccessListTx, error)

func (*AccessListTx) AsEthereumData

func (tx *AccessListTx) AsEthereumData() ethtypes.TxData

func (*AccessListTx) Copy

func (tx *AccessListTx) Copy() TxData

func (AccessListTx) Cost

func (tx AccessListTx) Cost() *big.Int

func (*AccessListTx) Descriptor

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

func (AccessListTx) EffectiveCost

func (tx AccessListTx) EffectiveCost(_ *big.Int) *big.Int

func (AccessListTx) EffectiveFee

func (tx AccessListTx) EffectiveFee(_ *big.Int) *big.Int

func (AccessListTx) EffectiveGasPrice

func (tx AccessListTx) EffectiveGasPrice(_ *big.Int) *big.Int

func (AccessListTx) Fee

func (tx AccessListTx) Fee() *big.Int

func (*AccessListTx) GetAccessList

func (tx *AccessListTx) GetAccessList() ethtypes.AccessList

func (*AccessListTx) GetBlobFeeCap

func (tx *AccessListTx) GetBlobFeeCap() *big.Int

func (*AccessListTx) GetBlobHashes

func (tx *AccessListTx) GetBlobHashes() []common.Hash

func (*AccessListTx) GetChainID

func (tx *AccessListTx) GetChainID() *big.Int

func (*AccessListTx) GetData

func (tx *AccessListTx) GetData() []byte

func (*AccessListTx) GetGas

func (tx *AccessListTx) GetGas() uint64

func (*AccessListTx) GetGasFeeCap

func (tx *AccessListTx) GetGasFeeCap() *big.Int

func (*AccessListTx) GetGasPrice

func (tx *AccessListTx) GetGasPrice() *big.Int

func (*AccessListTx) GetGasTipCap

func (tx *AccessListTx) GetGasTipCap() *big.Int

func (*AccessListTx) GetNonce

func (tx *AccessListTx) GetNonce() uint64

func (*AccessListTx) GetRawSignatureValues

func (tx *AccessListTx) GetRawSignatureValues() (v, r, s *big.Int)

func (*AccessListTx) GetTo

func (tx *AccessListTx) GetTo() *common.Address

func (*AccessListTx) GetValue

func (tx *AccessListTx) GetValue() *big.Int

func (*AccessListTx) Marshal

func (m *AccessListTx) Marshal() (dAtA []byte, err error)

func (*AccessListTx) MarshalTo

func (m *AccessListTx) MarshalTo(dAtA []byte) (int, error)

func (*AccessListTx) MarshalToSizedBuffer

func (m *AccessListTx) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AccessListTx) ProtoMessage

func (*AccessListTx) ProtoMessage()

func (*AccessListTx) Reset

func (m *AccessListTx) Reset()

func (*AccessListTx) SetAccesses

func (tx *AccessListTx) SetAccesses(v AccessList)

func (*AccessListTx) SetAmount

func (tx *AccessListTx) SetAmount(v sdk.Int)

func (*AccessListTx) SetGasPrice

func (tx *AccessListTx) SetGasPrice(v sdk.Int)

func (*AccessListTx) SetSignatureValues

func (tx *AccessListTx) SetSignatureValues(chainID, v, r, s *big.Int)

func (*AccessListTx) SetTo

func (tx *AccessListTx) SetTo(v string)

func (*AccessListTx) Size

func (m *AccessListTx) Size() (n int)

func (*AccessListTx) String

func (m *AccessListTx) String() string

func (*AccessListTx) TxType

func (tx *AccessListTx) TxType() uint8

func (*AccessListTx) Unmarshal

func (m *AccessListTx) Unmarshal(dAtA []byte) error

func (AccessListTx) Validate

func (tx AccessListTx) Validate() error

func (*AccessListTx) XXX_DiscardUnknown

func (m *AccessListTx) XXX_DiscardUnknown()

func (*AccessListTx) XXX_Marshal

func (m *AccessListTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccessListTx) XXX_Merge

func (m *AccessListTx) XXX_Merge(src proto.Message)

func (*AccessListTx) XXX_Size

func (m *AccessListTx) XXX_Size() int

func (*AccessListTx) XXX_Unmarshal

func (m *AccessListTx) XXX_Unmarshal(b []byte) error

type AccessTuple

type AccessTuple struct {
	Address     string   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storageKeys"`
}

func (*AccessTuple) Descriptor

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

func (*AccessTuple) Marshal

func (m *AccessTuple) Marshal() (dAtA []byte, err error)

func (*AccessTuple) MarshalTo

func (m *AccessTuple) MarshalTo(dAtA []byte) (int, error)

func (*AccessTuple) MarshalToSizedBuffer

func (m *AccessTuple) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AccessTuple) ProtoMessage

func (*AccessTuple) ProtoMessage()

func (*AccessTuple) Reset

func (m *AccessTuple) Reset()

func (*AccessTuple) Size

func (m *AccessTuple) Size() (n int)

func (*AccessTuple) String

func (m *AccessTuple) String() string

func (*AccessTuple) Unmarshal

func (m *AccessTuple) Unmarshal(dAtA []byte) error

func (*AccessTuple) XXX_DiscardUnknown

func (m *AccessTuple) XXX_DiscardUnknown()

func (*AccessTuple) XXX_Marshal

func (m *AccessTuple) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccessTuple) XXX_Merge

func (m *AccessTuple) XXX_Merge(src proto.Message)

func (*AccessTuple) XXX_Size

func (m *AccessTuple) XXX_Size() int

func (*AccessTuple) XXX_Unmarshal

func (m *AccessTuple) XXX_Unmarshal(b []byte) error

type AssociateTx

type AssociateTx struct {
	// signature values
	V             []byte `protobuf:"bytes,1,opt,name=v,proto3" json:"v,omitempty"`
	R             []byte `protobuf:"bytes,2,opt,name=r,proto3" json:"r,omitempty"`
	S             []byte `protobuf:"bytes,3,opt,name=s,proto3" json:"s,omitempty"`
	CustomMessage string `protobuf:"bytes,4,opt,name=custom_message,json=customMessage,proto3" json:"custom_message,omitempty"`
}

func NewAssociateTx

func NewAssociateTx(tx *ethtypes.Transaction, customMessage string) (*AssociateTx, error)

func (*AssociateTx) AsEthereumData

func (tx *AssociateTx) AsEthereumData() ethtypes.TxData

func (*AssociateTx) Copy

func (tx *AssociateTx) Copy() TxData

func (*AssociateTx) Cost

func (tx *AssociateTx) Cost() *big.Int

func (*AssociateTx) Descriptor

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

func (*AssociateTx) EffectiveCost

func (tx *AssociateTx) EffectiveCost(_ *big.Int) *big.Int

func (*AssociateTx) EffectiveFee

func (tx *AssociateTx) EffectiveFee(_ *big.Int) *big.Int

func (*AssociateTx) EffectiveGasPrice

func (tx *AssociateTx) EffectiveGasPrice(_ *big.Int) *big.Int

func (*AssociateTx) Fee

func (tx *AssociateTx) Fee() *big.Int

func (*AssociateTx) GetAccessList

func (tx *AssociateTx) GetAccessList() ethtypes.AccessList

func (*AssociateTx) GetBlobFeeCap

func (tx *AssociateTx) GetBlobFeeCap() *big.Int

func (*AssociateTx) GetBlobHashes

func (tx *AssociateTx) GetBlobHashes() []common.Hash

func (*AssociateTx) GetChainID

func (tx *AssociateTx) GetChainID() *big.Int

func (*AssociateTx) GetData

func (tx *AssociateTx) GetData() []byte

func (*AssociateTx) GetGas

func (tx *AssociateTx) GetGas() uint64

func (*AssociateTx) GetGasFeeCap

func (tx *AssociateTx) GetGasFeeCap() *big.Int

func (*AssociateTx) GetGasPrice

func (tx *AssociateTx) GetGasPrice() *big.Int

func (*AssociateTx) GetGasTipCap

func (tx *AssociateTx) GetGasTipCap() *big.Int

func (*AssociateTx) GetNonce

func (tx *AssociateTx) GetNonce() uint64

func (*AssociateTx) GetRawSignatureValues

func (tx *AssociateTx) GetRawSignatureValues() (v, r, s *big.Int)

func (*AssociateTx) GetTo

func (tx *AssociateTx) GetTo() *common.Address

func (*AssociateTx) GetValue

func (tx *AssociateTx) GetValue() *big.Int

func (*AssociateTx) Marshal

func (m *AssociateTx) Marshal() (dAtA []byte, err error)

func (*AssociateTx) MarshalTo

func (m *AssociateTx) MarshalTo(dAtA []byte) (int, error)

func (*AssociateTx) MarshalToSizedBuffer

func (m *AssociateTx) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AssociateTx) ProtoMessage

func (*AssociateTx) ProtoMessage()

func (*AssociateTx) Reset

func (m *AssociateTx) Reset()

func (*AssociateTx) SetSignatureValues

func (tx *AssociateTx) SetSignatureValues(_, _, _, _ *big.Int)

func (*AssociateTx) Size

func (m *AssociateTx) Size() (n int)

func (*AssociateTx) String

func (m *AssociateTx) String() string

func (*AssociateTx) TxType

func (tx *AssociateTx) TxType() byte

func (*AssociateTx) Unmarshal

func (m *AssociateTx) Unmarshal(dAtA []byte) error

func (*AssociateTx) Validate

func (tx *AssociateTx) Validate() error

func (*AssociateTx) XXX_DiscardUnknown

func (m *AssociateTx) XXX_DiscardUnknown()

func (*AssociateTx) XXX_Marshal

func (m *AssociateTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AssociateTx) XXX_Merge

func (m *AssociateTx) XXX_Merge(src proto.Message)

func (*AssociateTx) XXX_Size

func (m *AssociateTx) XXX_Size() int

func (*AssociateTx) XXX_Unmarshal

func (m *AssociateTx) XXX_Unmarshal(b []byte) error

type BlobTx

type BlobTx struct {
	ChainID    *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"chainID"`
	Nonce      uint64                                  `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	GasTipCap  *github_com_cosmos_cosmos_sdk_types.Int `` /* 140-byte string literal not displayed */
	GasFeeCap  *github_com_cosmos_cosmos_sdk_types.Int `` /* 140-byte string literal not displayed */
	GasLimit   uint64                                  `protobuf:"varint,5,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"`
	To         string                                  `protobuf:"bytes,6,opt,name=to,proto3" json:"to,omitempty"`
	Amount     *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value,omitempty"`
	Data       []byte                                  `protobuf:"bytes,8,opt,name=data,proto3" json:"data,omitempty"`
	Accesses   AccessList                              `protobuf:"bytes,9,rep,name=accesses,proto3,castrepeated=AccessList" json:"accessList"`
	BlobFeeCap *github_com_cosmos_cosmos_sdk_types.Int `` /* 144-byte string literal not displayed */
	BlobHashes [][]byte                                `protobuf:"bytes,11,rep,name=blob_hashes,json=blobHashes,proto3" json:"blob_hashes,omitempty"`
	Sidecar    *BlobTxSidecar                          `protobuf:"bytes,12,opt,name=sidecar,proto3" json:"sidecar,omitempty"`
	// signature values
	V []byte `protobuf:"bytes,13,opt,name=v,proto3" json:"v,omitempty"`
	R []byte `protobuf:"bytes,14,opt,name=r,proto3" json:"r,omitempty"`
	S []byte `protobuf:"bytes,15,opt,name=s,proto3" json:"s,omitempty"`
}

func NewBlobTx

func NewBlobTx(tx *ethtypes.Transaction) (*BlobTx, error)

func (*BlobTx) AsEthereumData

func (tx *BlobTx) AsEthereumData() ethtypes.TxData

func (*BlobTx) BlobGas

func (tx *BlobTx) BlobGas() uint64

func (*BlobTx) Copy

func (tx *BlobTx) Copy() TxData

func (BlobTx) Cost

func (tx BlobTx) Cost() *big.Int

func (*BlobTx) Descriptor

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

func (BlobTx) EffectiveCost

func (tx BlobTx) EffectiveCost(baseFee *big.Int) *big.Int

func (BlobTx) EffectiveFee

func (tx BlobTx) EffectiveFee(baseFee *big.Int) *big.Int

func (*BlobTx) EffectiveGasPrice

func (tx *BlobTx) EffectiveGasPrice(baseFee *big.Int) *big.Int

func (BlobTx) Fee

func (tx BlobTx) Fee() *big.Int

func (*BlobTx) GetAccessList

func (tx *BlobTx) GetAccessList() ethtypes.AccessList

func (*BlobTx) GetBlobFeeCap

func (tx *BlobTx) GetBlobFeeCap() *big.Int

func (*BlobTx) GetBlobHashes

func (tx *BlobTx) GetBlobHashes() []common.Hash

func (*BlobTx) GetChainID

func (tx *BlobTx) GetChainID() *big.Int

func (*BlobTx) GetData

func (tx *BlobTx) GetData() []byte

func (*BlobTx) GetGas

func (tx *BlobTx) GetGas() uint64

func (*BlobTx) GetGasFeeCap

func (tx *BlobTx) GetGasFeeCap() *big.Int

func (*BlobTx) GetGasPrice

func (tx *BlobTx) GetGasPrice() *big.Int

func (*BlobTx) GetGasTipCap

func (tx *BlobTx) GetGasTipCap() *big.Int

func (*BlobTx) GetNonce

func (tx *BlobTx) GetNonce() uint64

func (*BlobTx) GetRawSignatureValues

func (tx *BlobTx) GetRawSignatureValues() (v, r, s *big.Int)

func (*BlobTx) GetTo

func (tx *BlobTx) GetTo() *common.Address

func (*BlobTx) GetValue

func (tx *BlobTx) GetValue() *big.Int

func (*BlobTx) Marshal

func (m *BlobTx) Marshal() (dAtA []byte, err error)

func (*BlobTx) MarshalTo

func (m *BlobTx) MarshalTo(dAtA []byte) (int, error)

func (*BlobTx) MarshalToSizedBuffer

func (m *BlobTx) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BlobTx) ProtoMessage

func (*BlobTx) ProtoMessage()

func (*BlobTx) Reset

func (m *BlobTx) Reset()

func (*BlobTx) SetAccesses

func (tx *BlobTx) SetAccesses(v AccessList)

func (*BlobTx) SetAmount

func (tx *BlobTx) SetAmount(v sdk.Int)

func (*BlobTx) SetBlobFeeCap

func (tx *BlobTx) SetBlobFeeCap(v sdk.Int)

func (*BlobTx) SetBlobHashes

func (tx *BlobTx) SetBlobHashes(v [][]byte)

func (*BlobTx) SetBlobSidecar

func (tx *BlobTx) SetBlobSidecar(v *BlobTxSidecar)

func (*BlobTx) SetGasFeeCap

func (tx *BlobTx) SetGasFeeCap(v sdk.Int)

func (*BlobTx) SetGasTipCap

func (tx *BlobTx) SetGasTipCap(v sdk.Int)

func (*BlobTx) SetSignatureValues

func (tx *BlobTx) SetSignatureValues(chainID, v, r, s *big.Int)

func (*BlobTx) SetTo

func (tx *BlobTx) SetTo(v string)

func (*BlobTx) Size

func (m *BlobTx) Size() (n int)

func (*BlobTx) String

func (m *BlobTx) String() string

func (*BlobTx) TxType

func (tx *BlobTx) TxType() uint8

func (*BlobTx) Unmarshal

func (m *BlobTx) Unmarshal(dAtA []byte) error

func (BlobTx) Validate

func (tx BlobTx) Validate() error

func (*BlobTx) XXX_DiscardUnknown

func (m *BlobTx) XXX_DiscardUnknown()

func (*BlobTx) XXX_Marshal

func (m *BlobTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlobTx) XXX_Merge

func (m *BlobTx) XXX_Merge(src proto.Message)

func (*BlobTx) XXX_Size

func (m *BlobTx) XXX_Size() int

func (*BlobTx) XXX_Unmarshal

func (m *BlobTx) XXX_Unmarshal(b []byte) error

type BlobTxSidecar

type BlobTxSidecar struct {
	Blobs       [][]byte `protobuf:"bytes,1,rep,name=blobs,proto3" json:"blobs,omitempty"`
	Commitments [][]byte `protobuf:"bytes,2,rep,name=commitments,proto3" json:"commitments,omitempty"`
	Proofs      [][]byte `protobuf:"bytes,3,rep,name=proofs,proto3" json:"proofs,omitempty"`
}

func (*BlobTxSidecar) Descriptor

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

func (*BlobTxSidecar) GetBlobs

func (m *BlobTxSidecar) GetBlobs() [][]byte

func (*BlobTxSidecar) GetCommitments

func (m *BlobTxSidecar) GetCommitments() [][]byte

func (*BlobTxSidecar) GetProofs

func (m *BlobTxSidecar) GetProofs() [][]byte

func (*BlobTxSidecar) Marshal

func (m *BlobTxSidecar) Marshal() (dAtA []byte, err error)

func (*BlobTxSidecar) MarshalTo

func (m *BlobTxSidecar) MarshalTo(dAtA []byte) (int, error)

func (*BlobTxSidecar) MarshalToSizedBuffer

func (m *BlobTxSidecar) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BlobTxSidecar) ProtoMessage

func (*BlobTxSidecar) ProtoMessage()

func (*BlobTxSidecar) Reset

func (m *BlobTxSidecar) Reset()

func (*BlobTxSidecar) Size

func (m *BlobTxSidecar) Size() (n int)

func (*BlobTxSidecar) String

func (m *BlobTxSidecar) String() string

func (*BlobTxSidecar) Unmarshal

func (m *BlobTxSidecar) Unmarshal(dAtA []byte) error

func (*BlobTxSidecar) XXX_DiscardUnknown

func (m *BlobTxSidecar) XXX_DiscardUnknown()

func (*BlobTxSidecar) XXX_Marshal

func (m *BlobTxSidecar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BlobTxSidecar) XXX_Merge

func (m *BlobTxSidecar) XXX_Merge(src proto.Message)

func (*BlobTxSidecar) XXX_Size

func (m *BlobTxSidecar) XXX_Size() int

func (*BlobTxSidecar) XXX_Unmarshal

func (m *BlobTxSidecar) XXX_Unmarshal(b []byte) error

type DynamicFeeTx

type DynamicFeeTx struct {
	ChainID   *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"chainID"`
	Nonce     uint64                                  `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	GasTipCap *github_com_cosmos_cosmos_sdk_types.Int `` /* 140-byte string literal not displayed */
	GasFeeCap *github_com_cosmos_cosmos_sdk_types.Int `` /* 140-byte string literal not displayed */
	GasLimit  uint64                                  `protobuf:"varint,5,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"`
	To        string                                  `protobuf:"bytes,6,opt,name=to,proto3" json:"to,omitempty"`
	Amount    *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value,omitempty"`
	Data      []byte                                  `protobuf:"bytes,8,opt,name=data,proto3" json:"data,omitempty"`
	Accesses  AccessList                              `protobuf:"bytes,9,rep,name=accesses,proto3,castrepeated=AccessList" json:"accessList"`
	// signature values
	V []byte `protobuf:"bytes,10,opt,name=v,proto3" json:"v,omitempty"`
	R []byte `protobuf:"bytes,11,opt,name=r,proto3" json:"r,omitempty"`
	S []byte `protobuf:"bytes,12,opt,name=s,proto3" json:"s,omitempty"`
}

func NewDynamicFeeTx

func NewDynamicFeeTx(tx *ethtypes.Transaction) (*DynamicFeeTx, error)

func (*DynamicFeeTx) AsEthereumData

func (tx *DynamicFeeTx) AsEthereumData() ethtypes.TxData

func (*DynamicFeeTx) Copy

func (tx *DynamicFeeTx) Copy() TxData

func (DynamicFeeTx) Cost

func (tx DynamicFeeTx) Cost() *big.Int

func (*DynamicFeeTx) Descriptor

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

func (DynamicFeeTx) EffectiveCost

func (tx DynamicFeeTx) EffectiveCost(baseFee *big.Int) *big.Int

func (DynamicFeeTx) EffectiveFee

func (tx DynamicFeeTx) EffectiveFee(baseFee *big.Int) *big.Int

func (*DynamicFeeTx) EffectiveGasPrice

func (tx *DynamicFeeTx) EffectiveGasPrice(baseFee *big.Int) *big.Int

func (DynamicFeeTx) Fee

func (tx DynamicFeeTx) Fee() *big.Int

func (*DynamicFeeTx) GetAccessList

func (tx *DynamicFeeTx) GetAccessList() ethtypes.AccessList

func (*DynamicFeeTx) GetBlobFeeCap

func (tx *DynamicFeeTx) GetBlobFeeCap() *big.Int

func (*DynamicFeeTx) GetBlobHashes

func (tx *DynamicFeeTx) GetBlobHashes() []common.Hash

func (*DynamicFeeTx) GetChainID

func (tx *DynamicFeeTx) GetChainID() *big.Int

func (*DynamicFeeTx) GetData

func (tx *DynamicFeeTx) GetData() []byte

func (*DynamicFeeTx) GetGas

func (tx *DynamicFeeTx) GetGas() uint64

func (*DynamicFeeTx) GetGasFeeCap

func (tx *DynamicFeeTx) GetGasFeeCap() *big.Int

func (*DynamicFeeTx) GetGasPrice

func (tx *DynamicFeeTx) GetGasPrice() *big.Int

func (*DynamicFeeTx) GetGasTipCap

func (tx *DynamicFeeTx) GetGasTipCap() *big.Int

func (*DynamicFeeTx) GetNonce

func (tx *DynamicFeeTx) GetNonce() uint64

func (*DynamicFeeTx) GetRawSignatureValues

func (tx *DynamicFeeTx) GetRawSignatureValues() (v, r, s *big.Int)

func (*DynamicFeeTx) GetTo

func (tx *DynamicFeeTx) GetTo() *common.Address

func (*DynamicFeeTx) GetValue

func (tx *DynamicFeeTx) GetValue() *big.Int

func (*DynamicFeeTx) Marshal

func (m *DynamicFeeTx) Marshal() (dAtA []byte, err error)

func (*DynamicFeeTx) MarshalTo

func (m *DynamicFeeTx) MarshalTo(dAtA []byte) (int, error)

func (*DynamicFeeTx) MarshalToSizedBuffer

func (m *DynamicFeeTx) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DynamicFeeTx) ProtoMessage

func (*DynamicFeeTx) ProtoMessage()

func (*DynamicFeeTx) Reset

func (m *DynamicFeeTx) Reset()

func (*DynamicFeeTx) SetAccesses

func (tx *DynamicFeeTx) SetAccesses(v AccessList)

func (*DynamicFeeTx) SetAmount

func (tx *DynamicFeeTx) SetAmount(v sdk.Int)

func (*DynamicFeeTx) SetGasFeeCap

func (tx *DynamicFeeTx) SetGasFeeCap(v sdk.Int)

func (*DynamicFeeTx) SetGasTipCap

func (tx *DynamicFeeTx) SetGasTipCap(v sdk.Int)

func (*DynamicFeeTx) SetSignatureValues

func (tx *DynamicFeeTx) SetSignatureValues(chainID, v, r, s *big.Int)

func (*DynamicFeeTx) SetTo

func (tx *DynamicFeeTx) SetTo(v string)

func (*DynamicFeeTx) Size

func (m *DynamicFeeTx) Size() (n int)

func (*DynamicFeeTx) String

func (m *DynamicFeeTx) String() string

func (*DynamicFeeTx) TxType

func (tx *DynamicFeeTx) TxType() uint8

func (*DynamicFeeTx) Unmarshal

func (m *DynamicFeeTx) Unmarshal(dAtA []byte) error

func (DynamicFeeTx) Validate

func (tx DynamicFeeTx) Validate() error

func (*DynamicFeeTx) XXX_DiscardUnknown

func (m *DynamicFeeTx) XXX_DiscardUnknown()

func (*DynamicFeeTx) XXX_Marshal

func (m *DynamicFeeTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DynamicFeeTx) XXX_Merge

func (m *DynamicFeeTx) XXX_Merge(src proto.Message)

func (*DynamicFeeTx) XXX_Size

func (m *DynamicFeeTx) XXX_Size() int

func (*DynamicFeeTx) XXX_Unmarshal

func (m *DynamicFeeTx) XXX_Unmarshal(b []byte) error

type ExtensionOptionsEthereumTx

type ExtensionOptionsEthereumTx struct {
}

func (*ExtensionOptionsEthereumTx) Descriptor

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

func (*ExtensionOptionsEthereumTx) Marshal

func (m *ExtensionOptionsEthereumTx) Marshal() (dAtA []byte, err error)

func (*ExtensionOptionsEthereumTx) MarshalTo

func (m *ExtensionOptionsEthereumTx) MarshalTo(dAtA []byte) (int, error)

func (*ExtensionOptionsEthereumTx) MarshalToSizedBuffer

func (m *ExtensionOptionsEthereumTx) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExtensionOptionsEthereumTx) ProtoMessage

func (*ExtensionOptionsEthereumTx) ProtoMessage()

func (*ExtensionOptionsEthereumTx) Reset

func (m *ExtensionOptionsEthereumTx) Reset()

func (*ExtensionOptionsEthereumTx) Size

func (m *ExtensionOptionsEthereumTx) Size() (n int)

func (*ExtensionOptionsEthereumTx) String

func (m *ExtensionOptionsEthereumTx) String() string

func (*ExtensionOptionsEthereumTx) Unmarshal

func (m *ExtensionOptionsEthereumTx) Unmarshal(dAtA []byte) error

func (*ExtensionOptionsEthereumTx) XXX_DiscardUnknown

func (m *ExtensionOptionsEthereumTx) XXX_DiscardUnknown()

func (*ExtensionOptionsEthereumTx) XXX_Marshal

func (m *ExtensionOptionsEthereumTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExtensionOptionsEthereumTx) XXX_Merge

func (m *ExtensionOptionsEthereumTx) XXX_Merge(src proto.Message)

func (*ExtensionOptionsEthereumTx) XXX_Size

func (m *ExtensionOptionsEthereumTx) XXX_Size() int

func (*ExtensionOptionsEthereumTx) XXX_Unmarshal

func (m *ExtensionOptionsEthereumTx) XXX_Unmarshal(b []byte) error

type LegacyTx

type LegacyTx struct {
	Nonce    uint64                                  `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"`
	GasPrice *github_com_cosmos_cosmos_sdk_types.Int `` /* 135-byte string literal not displayed */
	GasLimit uint64                                  `protobuf:"varint,3,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"`
	To       string                                  `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty"`
	Amount   *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value,omitempty"`
	Data     []byte                                  `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
	// signature values
	V []byte `protobuf:"bytes,7,opt,name=v,proto3" json:"v,omitempty"`
	R []byte `protobuf:"bytes,8,opt,name=r,proto3" json:"r,omitempty"`
	S []byte `protobuf:"bytes,9,opt,name=s,proto3" json:"s,omitempty"`
}

func NewLegacyTx

func NewLegacyTx(tx *ethtypes.Transaction) (*LegacyTx, error)

func (*LegacyTx) AsEthereumData

func (tx *LegacyTx) AsEthereumData() ethtypes.TxData

func (*LegacyTx) Copy

func (tx *LegacyTx) Copy() TxData

func (LegacyTx) Cost

func (tx LegacyTx) Cost() *big.Int

func (*LegacyTx) Descriptor

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

func (LegacyTx) EffectiveCost

func (tx LegacyTx) EffectiveCost(_ *big.Int) *big.Int

func (LegacyTx) EffectiveFee

func (tx LegacyTx) EffectiveFee(_ *big.Int) *big.Int

func (LegacyTx) EffectiveGasPrice

func (tx LegacyTx) EffectiveGasPrice(_ *big.Int) *big.Int

func (LegacyTx) Fee

func (tx LegacyTx) Fee() *big.Int

func (*LegacyTx) GetAccessList

func (tx *LegacyTx) GetAccessList() ethtypes.AccessList

func (*LegacyTx) GetBlobFeeCap

func (tx *LegacyTx) GetBlobFeeCap() *big.Int

func (*LegacyTx) GetBlobHashes

func (tx *LegacyTx) GetBlobHashes() []common.Hash

func (*LegacyTx) GetChainID

func (tx *LegacyTx) GetChainID() *big.Int

copied from go-etherem/core/types:deriveChainId

func (*LegacyTx) GetData

func (tx *LegacyTx) GetData() []byte

func (*LegacyTx) GetGas

func (tx *LegacyTx) GetGas() uint64

func (*LegacyTx) GetGasFeeCap

func (tx *LegacyTx) GetGasFeeCap() *big.Int

func (*LegacyTx) GetGasPrice

func (tx *LegacyTx) GetGasPrice() *big.Int

func (*LegacyTx) GetGasTipCap

func (tx *LegacyTx) GetGasTipCap() *big.Int

func (*LegacyTx) GetNonce

func (tx *LegacyTx) GetNonce() uint64

func (*LegacyTx) GetRawSignatureValues

func (tx *LegacyTx) GetRawSignatureValues() (v, r, s *big.Int)

func (*LegacyTx) GetTo

func (tx *LegacyTx) GetTo() *common.Address

func (*LegacyTx) GetValue

func (tx *LegacyTx) GetValue() *big.Int

func (*LegacyTx) Marshal

func (m *LegacyTx) Marshal() (dAtA []byte, err error)

func (*LegacyTx) MarshalTo

func (m *LegacyTx) MarshalTo(dAtA []byte) (int, error)

func (*LegacyTx) MarshalToSizedBuffer

func (m *LegacyTx) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LegacyTx) ProtoMessage

func (*LegacyTx) ProtoMessage()

func (*LegacyTx) Reset

func (m *LegacyTx) Reset()

func (*LegacyTx) SetAmount

func (tx *LegacyTx) SetAmount(v sdk.Int)

func (*LegacyTx) SetGasPrice

func (tx *LegacyTx) SetGasPrice(v sdk.Int)

func (*LegacyTx) SetSignatureValues

func (tx *LegacyTx) SetSignatureValues(_, v, r, s *big.Int)

func (*LegacyTx) SetTo

func (tx *LegacyTx) SetTo(v string)

func (*LegacyTx) Size

func (m *LegacyTx) Size() (n int)

func (*LegacyTx) String

func (m *LegacyTx) String() string

func (*LegacyTx) TxType

func (tx *LegacyTx) TxType() uint8

func (*LegacyTx) Unmarshal

func (m *LegacyTx) Unmarshal(dAtA []byte) error

func (*LegacyTx) Validate

func (tx *LegacyTx) Validate() error

func (*LegacyTx) XXX_DiscardUnknown

func (m *LegacyTx) XXX_DiscardUnknown()

func (*LegacyTx) XXX_Marshal

func (m *LegacyTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LegacyTx) XXX_Merge

func (m *LegacyTx) XXX_Merge(src proto.Message)

func (*LegacyTx) XXX_Size

func (m *LegacyTx) XXX_Size() int

func (*LegacyTx) XXX_Unmarshal

func (m *LegacyTx) XXX_Unmarshal(b []byte) error

type TxData

type TxData interface {
	proto.Message
	TxType() byte
	Copy() TxData
	GetChainID() *big.Int
	GetAccessList() ethtypes.AccessList
	GetData() []byte
	GetNonce() uint64
	GetGas() uint64
	GetGasPrice() *big.Int
	GetGasTipCap() *big.Int
	GetGasFeeCap() *big.Int
	GetValue() *big.Int
	GetTo() *common.Address

	GetRawSignatureValues() (v, r, s *big.Int)
	SetSignatureValues(chainID, v, r, s *big.Int)

	AsEthereumData() ethtypes.TxData
	Validate() error

	Fee() *big.Int
	Cost() *big.Int

	EffectiveGasPrice(baseFee *big.Int) *big.Int
	EffectiveFee(baseFee *big.Int) *big.Int
	EffectiveCost(baseFee *big.Int) *big.Int

	GetBlobHashes() []common.Hash
	GetBlobFeeCap() *big.Int
}

Unfortunately `TxData` interface in go-ethereum/core/types defines its functions as private, so we have to define our own here.

func NewTxDataFromTx

func NewTxDataFromTx(tx *ethtypes.Transaction) (TxData, error)

Jump to

Keyboard shortcuts

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