MCPcopy Create free account
hub / github.com/cairoeth/preconfirmations / SaveRequestEntry

Method SaveRequestEntry

rpc/database/postgres_store.go:33–40  ·  view source on GitHub ↗
(entry RequestEntry)

Source from the content-addressed store, hash-verified

31}
32
33func (d *postgresStore) SaveRequestEntry(entry RequestEntry) error {
34 query := `INSERT INTO rpc_endpoint_requests
35 (id, received_at, request_duration_ms, is_batch_request, num_request_in_batch, http_method, http_url, http_query_param, http_response_status, ip_hash, origin, host, error) VALUES (:id, :received_at, :request_duration_ms, :is_batch_request, :num_request_in_batch, :http_method, :http_url, :http_query_param, :http_response_status, :ip_hash, :origin, :host, :error)`
36 ctx, cancel := context.WithTimeout(context.Background(), connTimeOut)
37 defer cancel()
38 _, err := d.DB.NamedExecContext(ctx, query, entry)
39 return err
40}
41
42func (d *postgresStore) SaveRawTxEntries(entries []*EthSendRawTxEntry) error {
43 query := `INSERT INTO rpc_endpoint_eth_send_raw_txs (id, request_id, is_on_oafc_list, is_white_hat_bundle_collection, white_hat_bundle_id, is_cancel_tx, needs_front_running_protection, was_sent_to_relay, was_sent_to_mempool, is_blocked, error, error_code, tx_raw, tx_hash, tx_from, tx_to, tx_nonce, tx_data, tx_smart_contract_method,fast) VALUES (:id, :request_id, :is_on_oafc_list, :is_white_hat_bundle_collection, :white_hat_bundle_id, :is_cancel_tx, :needs_front_running_protection, :was_sent_to_relay, :was_sent_to_mempool, :is_blocked, :error, :error_code, :tx_raw, :tx_hash, :tx_from, :tx_to, :tx_nonce, :tx_data, :tx_smart_contract_method, :fast)`

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected