Skip to content

Check event log arguments against event declarations #378

@xrchz

Description

@xrchz

The current semantics for event logging appears to accept any evaluated argument list and push it to the log:

(* TODO: check arguments length and types *)
vs <- eval_exprs cx es;
push_log (id, vs)

The corresponding statement typing rule currently only requires well_typed_exprs env es for Log id es, without checking the event id/signature, argument count, or argument types.

This is type-sound for the current permissive semantics, but it is likely not faithful to intended Vyper semantics. We should add semantic/type-system support for checking logs against event declarations, including module-qualified event names where applicable.

Follow-up from #308.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions