migration

package
v0.0.0-...-29d4719 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalTransaction

type GlobalTransaction struct {
	ID       string    `bson:"_id" json:"id"`
	OriginTx *OriginTx `bson:"originTx" json:"originTx"`
}

GlobalTransaction represents a global transaction.

type MigrateSourceChainTx

type MigrateSourceChainTx struct {
	FromDate time.Time
	ToDate   time.Time
	// contains filtered or unexported fields
}

MigrateSourceChainTx is the job to migrate vaa txHash and timestamp from vaa collection to globalTx collection.

func NewMigrationSourceChainTx

func NewMigrationSourceChainTx(
	db *mongo.Database,
	pageSize int,
	chainID sdk.ChainID,
	FromDate time.Time,
	ToDate time.Time,
	txTrackerAPIClient txtrackerProcessVaa.TxTrackerAPIClient,
	sleepTime time.Duration,
	logger *zap.Logger) *MigrateSourceChainTx

NewMigrationSourceChainTx creates a new migration job.

func (*MigrateSourceChainTx) Run

type OriginTx

type OriginTx struct {
	TxHash string `bson:"nativeTxHash" json:"txHash"`
	From   string `bson:"from" json:"from"`
	Status string `bson:"status" json:"status"`
}

OriginTx represents a origin transaction.

type VAASourceChain

type VAASourceChain struct {
	ID           string      `bson:"_id"`
	EmitterChain sdk.ChainID `bson:"emitterChain" json:"emitterChain"`
	Timestamp    *time.Time  `bson:"timestamp" json:"timestamp"`
	TxHash       *string     `bson:"txHash" json:"txHash,omitempty"`
}

VAASourceChain defines the structure of vaa fields needed for migration.

Jump to

Keyboard shortcuts

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