Last active
April 17, 2022 14:59
-
-
Save NBMSacha/86a7293da1f31b1521c9ca42fae782fe to your computer and use it in GitHub Desktop.
Safetin audit - GemPad - Uint optimizations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//l 366 | |
uint16 constant maxFeeLimit = 300; | |
//l 367 | |
uint8 constant maxProtectBlockLimit = 30; | |
//l 373 | |
uint8 private _protectBlockLiquidityFee; | |
//l 374 | |
uint8 private _protectBlockRewardFee; | |
//l 375 | |
uint8 private _protectBlockMarketingFee; | |
//l 380 | |
uint8 private constant BUY = 1; | |
//l 381 | |
uint8 private constant SELL = 2; | |
//l 382 | |
uint8 private constant TRANSFER = 3; | |
//l 383 | |
uint8 private constant PROTECT = 4; | |
//Here we look at fees variables. A fee variable cannot be that high that it needs being uint256. If you are using a 1000 or 10000 basis for fees applying, we recommend you multiply your fees variables by 10**as_much_as_you_need to save gas. | |
//l 387 | |
uint8 private _rewardFee; | |
//l 388 | |
uint8 private _previousRewardFee; | |
//l 390 | |
uint8 private _liquidityFee; | |
//l 391 | |
uint8 private _previousLiquidityFee; | |
//l 393 | |
uint8 private _marketingFee; | |
//l 394 | |
uint8 private _previousMarketingFee; | |
//l 396 | |
uint8 public buyRewardFee; | |
//l 397 | |
uint8 public buyLiquidityFee; | |
//l 398 | |
uint256 public buyMarketingFee; | |
//l 400 | |
uint8 public sellRewardFee; | |
//l 401 | |
uint8 public sellLiquidityFee; | |
//l 402 | |
uint8 public sellMarketingFee; | |
//line 404 : | |
uint8 public transferRewardFee; | |
//line 405 : | |
uint8 public transferLiquidityFee; | |
//line 406 | |
uint8 public transferMarketingFee; | |
//l 442 | |
uint8 buyRewardFee | |
//l443 | |
uint8 buyLiquidityFee, | |
//l 444 | |
uint8 buyMarketingFee | |
//l 447 | |
uint8 sellRewardFee | |
//l 448 | |
uint8 sellLiquidityFee | |
//l 449 | |
uint8 sellMarketingFee | |
//l 452 | |
uint8 transferRewardFee | |
//l 453 | |
uint8 transferLiquidityFee | |
//l 454 | |
uint8 transferMarketingFee | |
//l 464 | |
uint8 marketingFeeTokens, uint8 marketingFeeBNBSwapped | |
//l 612 | |
uint8 _buyRewardFee | |
//l 613 | |
uint8 _buyLiquidityFee | |
//l 614 | |
uint8 _buyMarketingFee | |
//l 627 | |
uint8 _sellRewardFee | |
//l 628 | |
uint8 _sellLiquidityFee | |
//l 628 | |
uint8 _sellMarketingFee | |
//l 642 | |
uint8 _transferRewardFee | |
//l 643 | |
uint8 _transferLiquidityFee | |
//l 644 | |
uint256 _transferMarketingFee | |
//l 657 | |
uint8 protectBlockRewardFee | |
//l 658 | |
uint8 protectBlockLiquidityFee | |
//l659 | |
uint8 protectBlockMarketingFee |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment