operation

package
v0.0.0-...-3eec7cb Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContractStats

type ContractStats struct {
	Count      int64
	LastAction time.Time
}

ContractStats -

type DAppStats

type DAppStats struct {
	Users  int64 `json:"users"`
	Calls  int64 `json:"txs"`
	Volume int64 `json:"volume"`
}

DAppStats -

type OPG

type OPG struct {
	LastID       int64
	ContentIndex int64
	Counter      int64
	Level        int64
	TotalCost    int64
	Flow         int64
	Internals    int
	Hash         []byte
	Entrypoint   string
	Timestamp    time.Time
	Status       types.OperationStatus
	Kind         types.OperationKind
}

OPG -

type Operation

type Operation struct {
	bun.BaseModel `bun:"operations"`

	ID                                 int64 `bun:"id,pk,notnull,autoincrement"`
	ContentIndex                       int64
	Level                              int64
	Counter                            int64
	Fee                                int64
	GasLimit                           int64
	StorageLimit                       int64
	Amount                             int64
	ConsumedGas                        int64
	StorageSize                        int64
	PaidStorageSizeDiff                int64
	Burned                             int64
	AllocatedDestinationContractBurned int64
	ProtocolID                         int64 `bun:"protocol_id,type:SMALLINT"`
	TicketUpdatesCount                 int
	BigMapDiffsCount                   int
	Tags                               types.Tags
	Nonce                              *int64 `bun:"nonce,nullzero"`

	InitiatorID   int64
	Initiator     account.Account `bun:"rel:belongs-to"`
	SourceID      int64
	Source        account.Account `bun:"rel:belongs-to"`
	DestinationID int64
	Destination   account.Account `bun:"rel:belongs-to"`
	DelegateID    int64
	Delegate      account.Account `bun:"rel:belongs-to"`

	Timestamp time.Time             `bun:"timestamp,pk,notnull"`
	Status    types.OperationStatus `bun:"status,type:SMALLINT"`
	Kind      types.OperationKind   `bun:"kind,type:SMALLINT"`

	Entrypoint      types.NullString `bun:"entrypoint,type:text"`
	Tag             types.NullString `bun:"tag,type:text"`
	Hash            []byte
	Parameters      []byte
	DeffatedStorage []byte
	Payload         []byte
	PayloadType     []byte
	Script          []byte `bun:"-"`

	Errors tezerrors.Errors `bun:"errors,type:bytea"`

	AST *ast.Script `bun:"-"`

	BigMapDiffs   []*bigmapdiff.BigMapDiff     `bun:"rel:has-many"`
	BigMapActions []*bigmapaction.BigMapAction `bun:"rel:has-many"`
	TicketUpdates []*ticket.TicketUpdate       `bun:"rel:has-many"`

	AllocatedDestinationContract bool
	Internal                     bool
}

Operation -

func (*Operation) CanHasStorageDiff

func (o *Operation) CanHasStorageDiff() bool

func (*Operation) GetID

func (o *Operation) GetID() int64

GetID -

func (*Operation) IsApplied

func (o *Operation) IsApplied() bool

IsApplied -

func (*Operation) IsCall

func (o *Operation) IsCall() bool

IsCall -

func (*Operation) IsEntrypoint

func (o *Operation) IsEntrypoint(entrypoint string) bool

IsEntrypoint -

func (*Operation) IsImplicit

func (o *Operation) IsImplicit() bool

IsImplicit -

func (*Operation) IsOrigination

func (o *Operation) IsOrigination() bool

IsOrigination -

func (*Operation) IsTransaction

func (o *Operation) IsTransaction() bool

IsTransaction -

func (*Operation) LogFields

func (o *Operation) LogFields() map[string]interface{}

LogFields -

func (*Operation) SetAllocationBurn

func (o *Operation) SetAllocationBurn(constants protocol.Constants)

SetAllocationBurn -

func (*Operation) SetBurned

func (o *Operation) SetBurned(constants protocol.Constants)

SetBurned -

func (*Operation) TableName

func (o *Operation) TableName() string

type Pageable

type Pageable struct {
	Operations []Operation
	LastID     string
}

Pageable -

type Repository

type Repository interface {
	Last(ctx context.Context, filter map[string]interface{}, lastID int64) (Operation, error)
	GetByHash(ctx context.Context, hash []byte) ([]Operation, error)
	GetByHashAndCounter(ctx context.Context, hash []byte, counter int64) ([]Operation, error)
	OPG(ctx context.Context, address string, size, lastID int64) ([]OPG, error)
	Origination(ctx context.Context, accountID int64) (Operation, error)
	GetByID(ctx context.Context, id int64) (Operation, error)
	ListEvents(ctx context.Context, accountID int64, size, offset int64) ([]Operation, error)
}

type Result

type Result struct {
	Status                       string
	ConsumedGas                  int64
	StorageSize                  int64
	PaidStorageSizeDiff          int64
	AllocatedDestinationContract bool
	Originated                   string
	Errors                       []*tezerrors.Error
}

Result -

type Stats

type Stats struct {
	Count      int64
	LastAction time.Time
}

Stats -

type TokenMethodUsageStats

type TokenMethodUsageStats struct {
	Count       int64
	ConsumedGas int64
}

TokenMethodUsageStats -

type TokenUsageStats

type TokenUsageStats map[string]TokenMethodUsageStats

TokenUsageStats -

Jump to

Keyboard shortcuts

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