From dcbca4579f2f2ef50be5c608320bc635920d99f9 Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Tue, 24 Sep 2024 13:19:28 -0400 Subject: [PATCH] Implement getting internal transactions for single transaction hash --- account.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/account.go b/account.go index e6a9ac1..498cd14 100644 --- a/account.go +++ b/account.go @@ -75,6 +75,16 @@ func (c *Client) InternalTxByAddress(address string, startBlock *int, endBlock * return } +// InternalTxForTransaction gets a list of "internal" transactions for a single transaction +func (c *Client) InternalTxForTransaction(hash string) (txs []InternalTx, err error) { + param := M{ + "txhash": hash, + } + + err = c.call("account", "txlistinternal", param, &txs) + return +} + // ERC20Transfers get a list of "erc20 - token transfer events" by // contract address and/or from/to address. //