transaction

package
v1.0.102 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthTransaction        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTransaction          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTransaction = fmt.Errorf("proto: unexpected end of group")
)

Functions

func TrimSliceHandler

func TrimSliceHandler(in []data.TransactionHandler) []data.TransactionHandler

TrimSliceHandler creates a copy of the provided slice without the excess capacity

Types

type Transaction

type Transaction struct {
	Nonce     uint64        `protobuf:"varint,1,opt,name=Nonce,proto3" json:"nonce"`
	Value     *math_big.Int `` /* 132-byte string literal not displayed */
	RcvAddr   []byte        `protobuf:"bytes,3,opt,name=RcvAddr,proto3" json:"receiver"`
	SndAddr   []byte        `protobuf:"bytes,4,opt,name=SndAddr,proto3" json:"sender"`
	GasPrice  uint64        `protobuf:"varint,5,opt,name=GasPrice,proto3" json:"gasPrice,omitempty"`
	GasLimit  uint64        `protobuf:"varint,6,opt,name=GasLimit,proto3" json:"gasLimit,omitempty"`
	Data      []byte        `protobuf:"bytes,7,opt,name=Data,proto3" json:"data,omitempty"`
	Signature []byte        `protobuf:"bytes,8,opt,name=Signature,proto3" json:"signature,omitempty"`
}

Transaction holds all the data needed for a value transfer or SC call

func TrimSlicePtr

func TrimSlicePtr(in []*Transaction) []*Transaction

TrimSlicePtr creates a copy of the provided slice without the excess capacity

func (*Transaction) Descriptor

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

func (*Transaction) Equal

func (this *Transaction) Equal(that interface{}) bool

func (*Transaction) GetData

func (m *Transaction) GetData() []byte

func (*Transaction) GetGasLimit

func (m *Transaction) GetGasLimit() uint64

func (*Transaction) GetGasPrice

func (m *Transaction) GetGasPrice() uint64

func (*Transaction) GetNonce

func (m *Transaction) GetNonce() uint64

func (*Transaction) GetRcvAddr

func (m *Transaction) GetRcvAddr() []byte

func (*Transaction) GetSignature

func (m *Transaction) GetSignature() []byte

func (*Transaction) GetSndAddr

func (m *Transaction) GetSndAddr() []byte

func (*Transaction) GetValue

func (m *Transaction) GetValue() *math_big.Int

func (*Transaction) GoString

func (this *Transaction) GoString() string

func (*Transaction) IsInterfaceNil

func (tx *Transaction) IsInterfaceNil() bool

IsInterfaceNil verifies if underlying object is nil

func (*Transaction) Marshal

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

func (*Transaction) MarshalJSON

func (tx *Transaction) MarshalJSON() ([]byte, error)

MarshalJSON converts the Transaction data type into its corresponding equivalent in byte slice. Note that Value data type is converted in a string

func (*Transaction) MarshalTo

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

func (*Transaction) MarshalToSizedBuffer

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

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) Reset

func (m *Transaction) Reset()

func (*Transaction) SetData

func (tx *Transaction) SetData(data []byte)

SetData sets the data of the transaction

func (*Transaction) SetRcvAddr

func (tx *Transaction) SetRcvAddr(addr []byte)

SetRcvAddr sets the receiver address of the transaction

func (*Transaction) SetSndAddr

func (tx *Transaction) SetSndAddr(addr []byte)

SetSndAddr sets the sender address of the transaction

func (*Transaction) SetValue

func (tx *Transaction) SetValue(value *big.Int)

SetValue sets the value of the transaction

func (*Transaction) Size

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

func (*Transaction) String

func (this *Transaction) String() string

func (*Transaction) Unmarshal

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

func (*Transaction) UnmarshalJSON

func (tx *Transaction) UnmarshalJSON(dataBuff []byte) error

UnmarshalJSON converts the provided bytes into a Transaction data type.

func (*Transaction) XXX_DiscardUnknown

func (m *Transaction) XXX_DiscardUnknown()

func (*Transaction) XXX_Marshal

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

func (*Transaction) XXX_Merge

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

func (*Transaction) XXX_Size

func (m *Transaction) XXX_Size() int

func (*Transaction) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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