Acton
Linting rules

E029: incoming-messages-duplicate-opcode

Checks `contract` header field `incomingMessages` for duplicate message opcodes.

Metadata

  • Code: E029
  • Rule: incoming-messages-duplicate-opcode
  • Status: Stable since v0.0.1
  • Quick fix: not available

What it does

Checks contract header field incomingMessages for duplicate message opcodes.

Why is this bad?

If two incoming message variants share the same opcode, message decoding is ambiguous.

Example

struct (0x1000) MsgA {}
struct (0x1000) MsgB {}
E029: incomingMessages contains message variants with duplicate opcode
contract Wallet { incomingMessages: MsgA | MsgB, }

Use instead:

struct (0x1000) MsgA {}
struct (0x1001) MsgB {}
Source code

Last updated on

On this page