/solidity-isomorphic-structs

Tool for automatic generation of isomorphic structs in solidity

Primary LanguageJavaScriptMIT LicenseMIT

solidity-isomorphic-structs

!!Work in progress!!

npm

Tool for automatic generation of isomorphic structs in solidity. Here isomorphic structures are structures that fit into 256 bits and therefore can be placed both in memory and on the stack.

Using special types for structures generated by this tool allows to place them on the stack and avoid unnecessary use of memory.

Also, packing multiple variables into such a struct on the stack can help avoid issues with solidity "stack too deep" error.

TODO: add a mode for generating structures that can be packed in storage with other variables.