Skip to content

Commit dcbca45

Browse files
committed
Implement getting internal transactions for single transaction hash
1 parent 0d2eec1 commit dcbca45

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

account.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ func (c *Client) InternalTxByAddress(address string, startBlock *int, endBlock *
7575
return
7676
}
7777

78+
// InternalTxForTransaction gets a list of "internal" transactions for a single transaction
79+
func (c *Client) InternalTxForTransaction(hash string) (txs []InternalTx, err error) {
80+
param := M{
81+
"txhash": hash,
82+
}
83+
84+
err = c.call("account", "txlistinternal", param, &txs)
85+
return
86+
}
87+
7888
// ERC20Transfers get a list of "erc20 - token transfer events" by
7989
// contract address and/or from/to address.
8090
//

0 commit comments

Comments
 (0)