Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Commit

Permalink
VUL-234 create graphql method "graphCallByTxHash"
Browse files Browse the repository at this point in the history
  • Loading branch information
ramilexe committed Feb 12, 2021
1 parent 89363e8 commit 265dc9f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions db/migrations/00004_graph_call_by_tx_hash.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-- +goose Up
CREATE FUNCTION "graphCallByTxHash"(txHash varchar(66)) returns SETOF RECORD
stable
language sql
as
$$
SELECT
gt.block_number,
gt.block_hash,
gt.tx_hash,
gt.index,
gc.src,
gc.dst,
gc.input,
gc.output,
gc.value,
gc.gas_used
FROM trace.graph_transaction gt
INNER JOIN trace.graph_call gc ON (gc.transaction_id = gt.id)
WHERE gt.tx_hash = $1
$$;
-- +goose Down
DROP FUNCTION "graphCallByTxHash"(varchar(66));

0 comments on commit 265dc9f

Please sign in to comment.