barn

package
v0.0.0-...-5fc2af4 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType string
const (
	Deposit  ActionType = "DEPOSIT"
	Withdraw ActionType = "WITHDRAW"
)
const (
	DelegateStart ActionType = "START"
	DelegateStop  ActionType = "STOP"
)
const (
	DelegateIncrease ActionType = "INCREASE"
	DelegateDecrease ActionType = "DECREASE"
)

type DelegateAction

type DelegateAction struct {
	ethtypes.BarnDelegateEvent
	ActionType ActionType
}

type DelegateChange

type DelegateChange struct {
	Sender              string
	Receiver            string
	Amount              decimal.Decimal
	ToNewDelegatedPower decimal.Decimal
	ActionType          ActionType

	TransactionHash  string
	TransactionIndex int64
	LogIndex         int64
}

type StakingAction

type StakingAction struct {
	UserAddress  string
	Amount       decimal.Decimal
	BalanceAfter decimal.Decimal
	ActionType   ActionType

	TransactionHash  string
	TransactionIndex int64
	LogIndex         int64
}

type Storable

type Storable struct {
	// contains filtered or unexported fields
}

func New

func New(block *types.Block) *Storable

func (*Storable) Execute

func (s *Storable) Execute(ctx context.Context) error

func (*Storable) ID

func (s *Storable) ID() string

func (*Storable) Result

func (s *Storable) Result() interface{}

func (*Storable) Rollback

func (s *Storable) Rollback(ctx context.Context, tx pgx.Tx) error

func (*Storable) SaveToDatabase

func (s *Storable) SaveToDatabase(ctx context.Context, tx pgx.Tx) error

Jump to

Keyboard shortcuts

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