zkevm-circuits
zkevm-circuits copied to clipboard
Create structs to avoid manual number increment
I'd pro ably try to abstract this as would be tough to mantain..
Why don't we have some kind of struct which deals with the complexity and just gives us directly access to all of the fields we're getting.
let offset_generator: OffsetManager = OffsetManager::generate(&step, OpcodeID);
let caller_balance_pair = offset_generator.caller_balance_pair();
// And the same for all the other fields.
Maybe not in this PR, but I belive something like this will make all our stuff much more auditable and mantainable.
Originally posted by @CPerezz in https://github.com/privacy-scaling-explorations/zkevm-circuits/pull/847#discussion_r1031374343