Skip to content

Commit

Permalink
refactor(RewardsStreamerMP): rename functions to be appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
gravityblast authored and 0x-r4bbit committed Dec 20, 2024
1 parent b5ce251 commit f601050
Show file tree
Hide file tree
Showing 7 changed files with 241 additions and 241 deletions.
88 changes: 44 additions & 44 deletions .gas-report
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
| script/DeployRewardsStreamerMP.s.sol:DeployRewardsStreamerMPScript contract | | | | | |
|-----------------------------------------------------------------------------|-----------------|---------|---------|---------|---------|
| Deployment Cost | Deployment Size | | | | |
| 6200681 | 29704 | | | | |
| 6200489 | 29703 | | | | |
| Function Name | min | avg | median | max | # calls |
| run | 5302574 | 5302574 | 5302574 | 5302574 | 63 |
| run | 5302330 | 5302330 | 5302330 | 5302330 | 63 |


| script/DeploymentConfig.s.sol:DeploymentConfig contract | | | | | |
Expand All @@ -17,9 +17,9 @@
| script/UpgradeRewardsStreamerMP.s.sol:UpgradeRewardsStreamerMPScript contract | | | | | |
|-------------------------------------------------------------------------------|-----------------|---------|---------|---------|---------|
| Deployment Cost | Deployment Size | | | | |
| 2845816 | 14079 | | | | |
| 2845624 | 14078 | | | | |
| Function Name | min | avg | median | max | # calls |
| run | 2383391 | 2383391 | 2383391 | 2383391 | 3 |
| run | 2383214 | 2383214 | 2383214 | 2383214 | 3 |


| src/RewardsStreamer.sol:RewardsStreamer contract | | | | | |
Expand All @@ -39,77 +39,77 @@
| src/RewardsStreamerMP.sol:RewardsStreamerMP contract | | | | | |
|------------------------------------------------------|-----------------|--------|--------|--------|---------|
| Deployment Cost | Deployment Size | | | | |
| 2525879 | 11640 | | | | |
| 2525687 | 11639 | | | | |
| Function Name | min | avg | median | max | # calls |
| MAX_LOCKUP_PERIOD | 349 | 349 | 349 | 349 | 6 |
| MAX_MULTIPLIER | 251 | 251 | 251 | 251 | 33 |
| MAX_MULTIPLIER | 273 | 273 | 273 | 273 | 33 |
| MIN_LOCKUP_PERIOD | 297 | 297 | 297 | 297 | 15 |
| MP_RATE_PER_YEAR | 253 | 253 | 253 | 253 | 9 |
| STAKING_TOKEN | 428 | 2036 | 2428 | 2428 | 322 |
| emergencyModeEnabled | 2420 | 2420 | 2420 | 2420 | 7 |
| enableEmergencyMode | 2485 | 19392 | 24677 | 24677 | 8 |
| getAccount | 1661 | 1661 | 1661 | 1661 | 72 |
| getStakedBalance | 2629 | 2629 | 2629 | 2629 | 1 |
| getUserTotalMP | 9230 | 9230 | 9230 | 9230 | 1 |
| getUserTotalMaxMP | 3123 | 3123 | 3123 | 3123 | 1 |
| getUserTotalStakedBalance | 15118 | 15118 | 15118 | 15118 | 1 |
| getStakedBalance | 2607 | 2607 | 2607 | 2607 | 1 |
| getUserTotalMaxMP | 3166 | 3166 | 3166 | 3166 | 1 |
| getUserTotalStakedBalance | 15162 | 15162 | 15162 | 15162 | 1 |
| getUserVaults | 5201 | 5201 | 5201 | 5201 | 4 |
| initialize | 115611 | 115611 | 115611 | 115611 | 65 |
| initialize | 115589 | 115589 | 115589 | 115589 | 65 |
| lastRewardTime | 395 | 1395 | 1395 | 2395 | 2 |
| leave | 56244 | 56244 | 56244 | 56244 | 1 |
| lock | 12063 | 34172 | 16480 | 73975 | 3 |
| proxiableUUID | 331 | 331 | 331 | 331 | 3 |
| mpBalanceOfUser | 9185 | 9185 | 9185 | 9185 | 1 |
| proxiableUUID | 376 | 376 | 376 | 376 | 3 |
| registerVault | 55866 | 72766 | 72966 | 72966 | 257 |
| rewardEndTime | 373 | 1373 | 1373 | 2373 | 2 |
| rewardStartTime | 352 | 1352 | 1352 | 2352 | 2 |
| rewardsBalanceOf | 1317 | 1317 | 1317 | 1317 | 4 |
| rewardEndTime | 351 | 1351 | 1351 | 2351 | 2 |
| rewardStartTime | 396 | 1396 | 1396 | 2396 | 2 |
| rewardsBalanceOf | 1362 | 1362 | 1362 | 1362 | 4 |
| setReward | 2583 | 50892 | 60278 | 102595 | 7 |
| setTrustedCodehash | 24243 | 24304 | 24243 | 26243 | 65 |
| stake | 131082 | 170202 | 177899 | 198232 | 66 |
| totalMP | 373 | 373 | 373 | 373 | 81 |
| totalMaxMP | 350 | 350 | 350 | 350 | 81 |
| totalRewardsAccrued | 373 | 373 | 373 | 373 | 3 |
| setTrustedCodehash | 24221 | 24282 | 24221 | 26221 | 65 |
| stake | 131124 | 170244 | 177941 | 198274 | 66 |
| totalMPAccrued | 351 | 351 | 351 | 351 | 81 |
| totalMaxMP | 395 | 395 | 395 | 395 | 81 |
| totalRewardsAccrued | 351 | 351 | 351 | 351 | 3 |
| totalRewardsSupply | 960 | 1921 | 1724 | 6700 | 30 |
| totalStaked | 396 | 396 | 396 | 396 | 82 |
| unstake | 60382 | 60919 | 60382 | 63877 | 13 |
| updateAccountMP | 15396 | 18474 | 17898 | 34998 | 21 |
| totalStaked | 374 | 374 | 374 | 374 | 82 |
| unstake | 60360 | 60897 | 60360 | 63855 | 13 |
| updateAccountMP | 15348 | 18429 | 17854 | 34954 | 21 |
| updateGlobalState | 11088 | 28045 | 25249 | 110284 | 21 |
| upgradeToAndCall | 3225 | 7887 | 8426 | 10936 | 5 |
| upgradeToAndCall | 3203 | 7892 | 8449 | 10914 | 5 |


| src/StakeManagerProxy.sol:StakeManagerProxy contract | | | | | |
|------------------------------------------------------|-----------------|-------|--------|--------|---------|
| Deployment Cost | Deployment Size | | | | |
| 256467 | 1263 | | | | |
| 256445 | 1263 | | | | |
| Function Name | min | avg | median | max | # calls |
| MAX_LOCKUP_PERIOD | 776 | 3776 | 5276 | 5276 | 6 |
| MAX_MULTIPLIER | 678 | 1905 | 678 | 5178 | 33 |
| MAX_MULTIPLIER | 700 | 1927 | 700 | 5200 | 33 |
| MIN_LOCKUP_PERIOD | 724 | 3424 | 5224 | 5224 | 15 |
| MP_RATE_PER_YEAR | 680 | 1180 | 680 | 5180 | 9 |
| STAKING_TOKEN | 855 | 6083 | 7355 | 7355 | 322 |
| emergencyModeEnabled | 7347 | 7347 | 7347 | 7347 | 7 |
| enableEmergencyMode | 28480 | 45381 | 50665 | 50665 | 8 |
| getAccount | 2115 | 2115 | 2115 | 2115 | 72 |
| getStakedBalance | 7559 | 7559 | 7559 | 7559 | 1 |
| getUserTotalMP | 9660 | 9660 | 9660 | 9660 | 1 |
| getUserTotalMaxMP | 3553 | 3553 | 3553 | 3553 | 1 |
| getUserTotalStakedBalance | 15548 | 15548 | 15548 | 15548 | 1 |
| getStakedBalance | 7537 | 7537 | 7537 | 7537 | 1 |
| getUserTotalMaxMP | 3596 | 3596 | 3596 | 3596 | 1 |
| getUserTotalStakedBalance | 15592 | 15592 | 15592 | 15592 | 1 |
| getUserVaults | 5637 | 6762 | 5637 | 10137 | 4 |
| implementation | 343 | 775 | 343 | 2343 | 412 |
| lastRewardTime | 822 | 1822 | 1822 | 2822 | 2 |
| rewardEndTime | 800 | 1800 | 1800 | 2800 | 2 |
| rewardStartTime | 779 | 4029 | 4029 | 7279 | 2 |
| rewardsBalanceOf | 1747 | 1747 | 1747 | 1747 | 4 |
| mpBalanceOfUser | 9615 | 9615 | 9615 | 9615 | 1 |
| rewardEndTime | 778 | 1778 | 1778 | 2778 | 2 |
| rewardStartTime | 823 | 4073 | 4073 | 7323 | 2 |
| rewardsBalanceOf | 1792 | 1792 | 1792 | 1792 | 4 |
| setReward | 28863 | 77206 | 86636 | 128881 | 7 |
| setTrustedCodehash | 52889 | 52889 | 52889 | 52889 | 2 |
| totalMP | 800 | 800 | 800 | 800 | 81 |
| totalMaxMP | 777 | 777 | 777 | 777 | 81 |
| totalRewardsAccrued | 800 | 800 | 800 | 800 | 3 |
| setTrustedCodehash | 52867 | 52867 | 52867 | 52867 | 2 |
| totalMPAccrued | 778 | 778 | 778 | 778 | 81 |
| totalMaxMP | 822 | 822 | 822 | 822 | 81 |
| totalRewardsAccrued | 778 | 778 | 778 | 778 | 3 |
| totalRewardsSupply | 1387 | 2498 | 2151 | 11627 | 30 |
| totalStaked | 823 | 823 | 823 | 823 | 82 |
| updateAccountMP | 41755 | 44833 | 44257 | 61357 | 21 |
| totalStaked | 801 | 801 | 801 | 801 | 82 |
| updateAccountMP | 41707 | 44788 | 44213 | 61313 | 21 |
| updateGlobalState | 37076 | 54033 | 51237 | 136272 | 21 |
| upgradeToAndCall | 29868 | 33720 | 33720 | 37572 | 2 |
| upgradeToAndCall | 29846 | 33698 | 33698 | 37550 | 2 |


| src/StakeVault.sol:StakeVault contract | | | | | |
Expand All @@ -123,11 +123,11 @@
| lock | 33245 | 60677 | 50845 | 107772 | 4 |
| owner | 2339 | 2339 | 2339 | 2339 | 257 |
| register | 87015 | 103915 | 104115 | 104115 | 257 |
| stake | 33411 | 241491 | 252403 | 272784 | 67 |
| stake | 33411 | 241532 | 252445 | 272826 | 67 |
| stakeManager | 368 | 368 | 368 | 368 | 257 |
| trustStakeManager | 28953 | 28953 | 28953 | 28953 | 1 |
| unstake | 33282 | 96630 | 102062 | 109909 | 14 |
| withdraw | 42289 | 42289 | 42289 | 42289 | 1 |
| unstake | 33282 | 96610 | 102040 | 109887 | 14 |
| withdraw | 42267 | 42267 | 42267 | 42267 | 1 |


| src/XPNFTToken.sol:XPNFTToken contract | | | | | |
Expand Down Expand Up @@ -201,7 +201,7 @@
| test/mocks/MockToken.sol:MockToken contract | | | | | |
|---------------------------------------------|-----------------|-------|--------|-------|---------|
| Deployment Cost | Deployment Size | | | | |
| 625370 | 3260 | | | | |
| 625454 | 3260 | | | | |
| Function Name | min | avg | median | max | # calls |
| approve | 46330 | 46339 | 46342 | 46342 | 262 |
| balanceOf | 558 | 989 | 558 | 2558 | 139 |
Expand Down
Loading

0 comments on commit f601050

Please sign in to comment.