New answers tagged

0

data := common.TrimLeftZeroes(log.Data) hex := common.Bytes2Hex(data) hex = TrimLeftZeroes(hex) erc20Amount, err := hexutil.DecodeBig("0x" + hex) func TrimLeftZeroes(hex string) string { idx := 0 for ; idx < len(hex); idx++ { if hex[idx] != '0' { break } } return hex[idx:] }


0

I think you are confusing different things: The string you have pasted 000000000000000000000000000000000000000000000000000000174876e80000... are the parameters that were used to invoke the constructor of the contract. The data parameter is passed to the contract. The contract can interpret it in any way he wants. But usually solidity contracts follow the ...


0

You can find the go implementation of the header struct here. It could be implemented in different languages differently depending on the corresponding programming patterns. However it should match the specs in the Ethereum yellow paper.


Top 50 recent answers are included