Solidity: Support structs and enums in ABI

Created on 24 May 2016  路  3Comments  路  Source: ethereum/solidity

Implement the following specification: https://github.com/ethereum/EIPs/issues/50

feature

Most helpful comment

This has been implemented as of 0.4.19.

All 3 comments

Just a note to myself: The encoder for tuples / structs should work as follows:

// nextfree is the place where we can allocate memory,
// all pointers are absolute memory positions
encodeTupleToMemory_t1t2t3...tn(from, to, nextfree) -> (next, nextfree_)
{
    encode values from "from" to "to", passing and updating "nextfree"
    store offsets relative to "to"
    return (from + 'head size', updated nextfree)
}

This has been implemented as of 0.4.19.

Was this page helpful?
0 / 5 - 0 ratings