Skip to content

EVM event does not emits correctly same Event called twice on same function call #600

@eduardonunesp

Description

@eduardonunesp

The issue was reported by E11, according to Allejo

Bug

The bug happens when a Contract with an Event is called twice inside a function body, the Event is only emitted one time, let's say we have a Contract like the following:

contract SimpleStore {
  uint256 public value;

  event NewValueSet(uint256 indexed _value);

  function set(uint256 _value) public {
    value = _value;
    emit NewValueSet(value);
    emit NewValueSet(value + 1);
  }
}

If a transaction was sent to the SimpleStore contract on function set with value equals 1, only one event will be emitted with the value equals 1, and the second event with value equals 2 isn't emitted

Expected

If a transaction was sent to the SimpleStore contract on function set with a value equals 1, two events should be emitted a first one with the value of 1 and a second with the value of 2

A proof of concept can be found at: loomnetwork/loom-js#194

Metadata

Metadata

Assignees

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