FreeFee
Contents
Globals
Var | Type |
---|---|
userUsage | mapping(address => struct IFreeFee.UsageInfo) |
totalUsage | uint256 |
globalTimestamp | uint256 |
Functions
constructor
No description
Declaration:
Modifiers:
Modifier |
---|
Only |
estimateTotalLeft
Estimate total daily free fee left.
Declaration:
Modifiers: No modifiers
Args:
Arg | Type | Description |
---|---|---|
| uint256 | Current timestamp |
estimateUsage
Estimate user daily free fee usage.
Declaration:
Modifiers: No modifiers
Args:
Arg | Type | Description |
---|---|---|
| struct IFreeFee.UsageInfo | User usage information |
| uint256 | Current timestamp |
estimateFreeFee
Estimate user daily free fee left.
Declaration:
Modifiers: No modifiers
Args:
Arg | Type | Description |
---|---|---|
| address | User address |
| uint256 | Current timestamp |
consume
Consume user usage, it only can be called by router.
Declaration:
Modifiers:
Modifier |
---|
nonReentrant |
onlyRouter |
Args:
Arg | Type | Description |
---|---|---|
| address | Transaction sender |
| uint256 | Usage amount |
onAfterBlock
After block callback, it only can be called by router, it will update globalTimestamp
if the time interval exceeds freeFeeRecoverInterval
.
Declaration:
Modifiers:
Modifier |
---|
nonReentrant |
onlyRouter |
Last updated