:guitar: Golang client for Ethereum Etherscan API (and its families like BscScan) / Golang 以太坊 Etherscan API库(也支持同一家族的BscScan)
240
stars
107
forks
source link
Etherscan api can return the string "0_0" as the traceId for InternalTx requests #6
Closed
BenKnigge closed 6 years ago
I've found a bug.
[Error] json unmarshal outcome: json: cannot unmarshal number 0_0 into Go struct field InternalTx.traceId of type int
To recreate this issue
internalTX, err := etherScanClient.InternalTxByAddress(address, &startBlock, &bestBlock, 1, 0, true)
Address "0x8b7B6C61238088593BF75eEC8FBF58D0a615d30c"
where startBlock is 0 and bestBlock is the current best block of around 6.3 million
The Json returned is huge so I'll only quote the relevant node.
The InternalTx.traceId will need to be a string or the string "0_0" will need to be serialized to an int.
Which method do you prefer?