Skip to main content

E0033: Event Arity Mismatch

You emitted an event with the wrong number of arguments.

Example

abi Events {
event Transfer(from: i64, to: i64);
}

fn main() {
emit Transfer(1); // Error: event `Transfer` expects 2 arguments but 1 was provided
}

How to fix

Pass the correct number of arguments to the event:

abi Events {
event Transfer(from: i64, to: i64);
}

fn main() {
emit Transfer(1, 2); // OK
}