mirror of
https://github.com/grassrootseconomics/cic-custodial.git
synced 2024-12-01 17:46:46 +01:00
27 lines
366 B
Go
27 lines
366 B
Go
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,
|
|
otx.TrackingId,
|
|
otx.Type,
|
|
otx.RawTx,
|
|
otx.TxHash,
|
|
otx.From,
|
|
otx.Data,
|
|
otx.GasPrice,
|
|
otx.Nonce,
|
|
).Scan(&id); err != nil {
|
|
return id, err
|
|
}
|
|
|
|
return id, nil
|
|
}
|