ethereum / eth-abi

Ethereum ABI utilities for python
MIT License
247 stars 269 forks source link

Update arrays to use head-tail encoding #92

Closed davesque closed 6 years ago

davesque commented 6 years ago

What was wrong?

Array encoding was not using head-tail encoding when necessary (for dynamic elements) as was discovered in the discussion for this PR: #90 .

Closes #93

How was it fixed?

Added this behavior and updated tests.

Cute Animal Picture

Cute animal picture

davesque commented 6 years ago

@carver Yes, that's a good idea. Actually, the community member who originally identified this issue ( @tristan ) in pr #90 provided an example encoding which was being returned from a contract. I did confirm that our implementation creates the same encoding. However, it wouldn't hurt to check a more complicated use case.