cic-custodial/internal/store/otx.go

27 lines
366 B
Go
Raw Normal View History

2023-02-09 08:42:15 +01:00
package store
import "context"
func (s *PostgresStore) CreateOTX(ctx context.Context, otx OTX) (uint, error) {
var (
id uint
)
if err := s.db.QueryRow(
ctx,
s.queries.CreateOTX,
2023-02-12 10:50:43 +01:00
otx.TrackingId,
otx.Type,
2023-02-09 08:42:15 +01:00
otx.RawTx,
otx.TxHash,
otx.From,
otx.Data,
otx.GasPrice,
otx.Nonce,
).Scan(&id); err != nil {
return id, err
}
return id, nil
}