What kind of contracts should I have to limit transfers per transaction?

In ERC20 I don't know how to limit X amount per transaction. Thank you for your time.

Best wishes

1 Like

Hey @RyanSS8 try this:

  1. add this variable:
    uint256 maxTxAmount = <put here the amount> * 10 ** _decimals;

  2. add this inside transfer function:
    require(amount <= maxTxAmount, "Amount is exceeding maxTxAmount");

1 Like

Thank you FreezyEx!

Only this way?. Another alternative?. Thank you again.

Best wishes
RyanSS8

1 Like