cic-custodial/internal/store/store.go
Mohammed Sohail cf1f9f34c3
refactor: task handlers, emitter, tx signer, et.c.
* fallback to custom ethereum checksum validator -> https://github.com/go-playground/validator/issues/1073
* decouple jetsream emitter to separate package
* refactor task handlers into individual files
* add error handler for echo to capture unexpected errors and log them
* move handler dependencies into single struct container -> custodialContainer
* replace signer to use EIP 1559 signer -> celoutils v1
* Add 1 minutes timeout to all custodial tasks
2023-02-20 09:56:30 +00:00

33 lines
580 B
Go

package store
import (
"context"
"github.com/grassrootseconomics/cic-custodial/pkg/status"
)
type (
OTX struct {
TrackingId string
Type string
RawTx string
TxHash string
From string
Data string
GasPrice uint64
Nonce uint64
}
DispatchStatus struct {
OtxId uint
Status status.Status
}
Store interface {
// OTX (Custodial originating transactions).
CreateOTX(ctx context.Context, otx OTX) (id uint, err error)
// Dispatch status.
CreateDispatchStatus(ctx context.Context, dispatch DispatchStatus) error
}
)