/ CONTRIBUTIONS

Fixing ABI array unpacking in go-ethereum

After working with NFTs for a while I stumbled upon the (rare) case where you would want to use nested arrays in solidity…

Using nested arrays is admittedly a bad idea, but it’s always worth trying different approaches in solidity. However, after successfully implementing a smartcontract with nested data, I stumbled on an issue in go-ethereum: the bindings created by the abigen tool returned misaligned and incomplete array data! It turned out the unpacking code in go-ethereum simply didn’t account for it, even though it’s in the ABI spec 1. There were some related issues to nested arrays as well, e.g. the generated code did not support it either, and the feature needs unit-tests as well.

I thought this may be a good way to get involved in the open-source development of go-ethereum, and so I created an issue, and made a subsequent PR that fixes it 🎉: go-ethereum#15676