handler

package
v0.0.0-...-063fda9 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateLostBond

func CalculateLostBond(ctx *svc.ServiceContext)

func HandlePendingBlock

func HandlePendingBlock(ctx *svc.ServiceContext, block schema.SyncBlock) error

func HandleRollbackBlock

func HandleRollbackBlock(ctx *svc.ServiceContext, block schema.SyncBlock) error

func LatestBlackNumber

func LatestBlackNumber(ctx *svc.ServiceContext)

func LogFilter

func LogFilter(ctx *svc.ServiceContext, block schema.SyncBlock, addresses []common.Address, topics [][]common.Hash) ([]*schema.SyncEvent, error)

func LogsToEvents

func LogsToEvents(ctx *svc.ServiceContext, logs []types.Log, syncBlockID int64) ([]*schema.SyncEvent, error)

func Run

func Run(ctx *svc.ServiceContext)

func SyncBlock

func SyncBlock(ctx *svc.ServiceContext)

func SyncCredit

func SyncCredit(ctx *svc.ServiceContext)

func SyncDispute

func SyncDispute(ctx *svc.ServiceContext)

func SyncEvent

func SyncEvent(ctx *svc.ServiceContext)

Types

type RetryDisputeGameClient

type RetryDisputeGameClient struct {
	Client             *contract.RateAndRetryDisputeGameClient
	DB                 *gorm.DB
	DisputeGameAddress common.Address
}

func NewRetryDisputeGameClient

func NewRetryDisputeGameClient(db *gorm.DB, address common.Address, rpc *ethclient.Client, limit rate.Limit,
	burst int,
) (*RetryDisputeGameClient, error)

func (*RetryDisputeGameClient) GetAllAddress

func (r *RetryDisputeGameClient) GetAllAddress(disputeGame *common.Address) (map[string]bool, error)

func (*RetryDisputeGameClient) GetCredit

func (r *RetryDisputeGameClient) GetCredit(ctx context.Context, address common.Address) (*big.Int, error)

func (*RetryDisputeGameClient) ProcessDisputeGameCreated

func (r *RetryDisputeGameClient) ProcessDisputeGameCreated(ctx context.Context, evt schema.SyncEvent) error

func (*RetryDisputeGameClient) ProcessDisputeGameCredit

func (r *RetryDisputeGameClient) ProcessDisputeGameCredit(ctx context.Context) error

func (*RetryDisputeGameClient) ProcessDisputeGameMove

func (r *RetryDisputeGameClient) ProcessDisputeGameMove(ctx context.Context, evt schema.SyncEvent) error

func (*RetryDisputeGameClient) ProcessDisputeGameResolve

func (r *RetryDisputeGameClient) ProcessDisputeGameResolve(evt schema.SyncEvent) error

Jump to

Keyboard shortcuts

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