Skip to content

Array modification events are not instrumented #5

@shaunazzopardi

Description

@shaunazzopardi

The current implementation is not able to deal with array instrumentation events, e.g. if list is a uint[] then both events list@(true) and list[id]@(true) are ignored by the instrumentation engine.

Implementing this is not straightforward. Keeping the whole previous state of an array is not viable from a gas-point of view. Thus although we may allow events of the kind list@(true) allowing reference to the previous value of list (LARVA_previous_list) is not viable.

A more viable approach is to simply capture modification of points in the array, list[id]@(true), and keep the previous value at that point.

Here we also need to consider the push() and pop() syntactic sugar of arrays when instrumenting a smart contract.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions