sim.toml
to prefix the generated names.
codegen_naming_convention
property and other sim.toml
configuration options, visit the App Structure page.Stack too deep
compilation error if your event contains more than 16 parameters, or if your handler function declares too many local variables. This is due to a fundamental limit in the Solidity EVM.
The solution is to use a pattern called Struct Flattening. You group your event parameters into a struct
and then define your event to take this struct as a single, unnamed parameter. Sim IDX recognizes this specific pattern and will automatically “flatten” the struct’s members into individual columns in your database. This gives you the best of both worlds: code that compiles and a clean, relational database schema.
listeners/src/
), not in the generated files. Files in listeners/lib/sim-idx-generated/
are auto-generated and should never be modified directly, as they will be overwritten when you run sim build
.Define a Struct
listeners/src/
, but it must be properly imported in any file where you plan to use it for events or handler functions.Update Event Definition
Populate and Emit the Struct