+
+
+ {t.children.map((tc, i, a) => (
+
+ ))}
+
+
+ )}
+ >
+ );
+};
+
+export default React.memo(TraceItem);
diff --git a/src/useErigonHooks.ts b/src/useErigonHooks.ts
index 7322a0d..2bb308c 100644
--- a/src/useErigonHooks.ts
+++ b/src/useErigonHooks.ts
@@ -308,3 +308,89 @@ export const useInternalOperations = (
return intTransfers;
};
+
+export type TraceEntry = {
+ type: string;
+ depth: number;
+ from: string;
+ to: string;
+ value: BigNumber;
+ input: string;
+};
+
+export type TraceGroup = TraceEntry & {
+ children: TraceGroup[] | null;
+};
+
+export const useTraceTransaction = (
+ provider: JsonRpcProvider | undefined,
+ txHash: string
+): TraceGroup[] | undefined => {
+ const [traceGroups, setTraceGroups] = useState