refactor: use simulate instead of timebased input #10991
Labels
C-l1-contracts
Component: contracts deployed to L1
C-node
Component: Aztec Node
T-refactor
Type: this code needs refactoring
A few of our contracts have had extra functions added to allow passing "time" as input instead of using the
block.timestamp
to allow us to simulate the execution in the future. While some nodes support providing "block overrides", viem which we used did not expose it, so we just added it as argument to work around it first.However, versions
>= 2.22.0
of viem now support it https://viem.sh/docs/actions/public/simulate, so we can delete a few of our extra functions and use the overrides instead.BEFORE doing all the changes, check that it works with anvil, as it might not have the needed functionality.
The text was updated successfully, but these errors were encountered: