💳Transaction Limits
sERC20 takes full control when handling transaction limits. The built in methods control both your maximum single transaction amounts and maximum wallet balances.
Restrictions
The maximum single transaction amount must be less than or equal to the maximum wallet amount.
The maximum wallet amount must be equal to or higher than the maximum single transaction amount.
The maximum single transaction amount can never be lowered, it is important that you set a sensible default during initialisation.
Like the maximum single transaction amount, the maximum wallet amount also can never be lowered. Again it is important that you set a sensible default during initialisation.
Setting up transaction limits
sERC20 will automatically initialise with 0 max single transaction limit and 0 max wallet limit. These must be manually set before you can open trading.
Call these contract methods to set your max transactions limits, remember this must be done before trading can be opened.
Changing transaction limits
Unlike taxes, the sERC20 contract takes full control of changes to your transaction limits. Under the hood the library exposes the following functions for your convenience.
Setting the maximum single transaction amount
This method access the maximum single transaction amount as an exact amount - i.e x 10**decimals
Setting the maximum wallet amount
This method access the maximum wallet amount as an exact amount - i.e x 10**decimals
Reading transaction limits
The sERC20 contract exposes functions for reading the current transaction limits. You should NEVER handle these yourself, always refer to our built in methods to maintain your sERC20 implementation integrity.
Retrieve the maximum single transaction amount
Retrieve the maximum wallet amount
Remember! ALWAYS use our build in methods any time you access state that can be controlled by sERC20, doing otherwise compromises your implementation integrity.
Last updated