3

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?

0

1 Answer 1

5

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.

1

Your Answer

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

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