I want to add all the arguments for my event to be indexed

event TokenPurchase(
  address indexed purchaser, 
  address indexed beneficiary,
  uint256 indexed value,
  uint256 indexed amount,
  uint256 indexed refund_amount

But im getting this error when i compile

TypeError: More than 3 indexed arguments for event.

Am I really limited to three items indexed?


1 Answer 1


From the docs:

Up to three parameters can receive the attribute indexed which will cause the respective arguments to be searched for: It is possible to filter for specific values of indexed arguments in the user interface.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.