Wrong encoding and decoding tests for two-dimensional variadic arrays #1570
Description
Encoding of two-dimensional variadic arrays in these tests is wrong:
I took these tests for my own implementation of ABI encoding and found out that contracts would not deploy when I wrote some integration tests. These tests are built on the premise that offset of dynamic elements in a dynamic collection should be counted from the beginning of the whole encoding. The correct encoding is that offset is counted from the beginning of the dynamic collection regardless of the position of the dynamic collection in the whole encoding.
Here is a deployed contract using a correct encoding in the ctor: https://kovan.etherscan.io/address/0x812b72fa1fb3b842cb193d743a44ec8439c9a060#readContract
Here is my corrected version of the tests zeriontech/Web3Swift@8ab1f12
I would be very grateful if you star my project if that information was of any help : )