Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(.gas-report, .gas-snapshot): update reports #122

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions .gas-report
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
| contracts/StakeManager.sol:StakeManager contract | | | | | |
|--------------------------------------------------|-----------------|--------|--------|--------|---------|
| Deployment Cost | Deployment Size | | | | |
| 2914993 | 14877 | | | | |
| 2931383 | 14953 | | | | |
| Function Name | min | avg | median | max | # calls |
| EPOCH_SIZE | 307 | 307 | 307 | 307 | 816 |
| MAX_BOOST | 285 | 285 | 285 | 285 | 1 |
| MAX_LOCKUP_PERIOD | 361 | 361 | 361 | 361 | 4 |
| MIN_LOCKUP_PERIOD | 287 | 287 | 287 | 287 | 11 |
| MIN_LOCKUP_PERIOD | 287 | 287 | 287 | 287 | 12 |
| YEAR | 263 | 263 | 263 | 263 | 1 |
| accounts | 1597 | 1597 | 1597 | 1597 | 25030 |
| calculateMPToMint | 740 | 740 | 740 | 740 | 3 |
| accounts | 1597 | 1597 | 1597 | 1597 | 23368 |
| calculateMPToMint | 740 | 740 | 740 | 740 | 4 |
| currentEpoch | 406 | 1691 | 2406 | 2406 | 28 |
| epochEnd | 627 | 639 | 627 | 4627 | 635 |
| epochReward | 1403 | 2903 | 1403 | 5903 | 3 |
| executeAccount | 28897 | 95308 | 95073 | 169064 | 22594 |
| executeAccount | 28897 | 95321 | 95004 | 171987 | 20929 |
| executeEpoch | 23436 | 169158 | 164483 | 204283 | 574 |
| isVault | 540 | 567 | 540 | 2540 | 20089 |
| isVault | 540 | 570 | 540 | 2540 | 18426 |
| lock | 23840 | 23840 | 23840 | 23840 | 1 |
| migrateTo | 23869 | 23875 | 23875 | 23881 | 2 |
| migration | 439 | 1439 | 1439 | 2439 | 4 |
Expand All @@ -24,10 +24,10 @@
| pendingMPToBeMinted | 364 | 364 | 364 | 364 | 512 |
| pendingReward | 364 | 1398 | 2364 | 2364 | 29 |
| previousManager | 275 | 275 | 275 | 275 | 13 |
| setVault | 46239 | 46239 | 46239 | 46239 | 279 |
| setVault | 46239 | 46239 | 46239 | 46239 | 280 |
| stake | 23983 | 23983 | 23983 | 23983 | 1 |
| stakeRewardEstimate | 436 | 2269 | 2436 | 2436 | 12 |
| stakedToken | 273 | 273 | 273 | 273 | 20105 |
| stakedToken | 273 | 273 | 273 | 273 | 18442 |
| startMigration | 108037 | 108045 | 108049 | 108049 | 3 |
| totalSupply | 740 | 1921 | 2740 | 2740 | 22 |
| totalSupplyBalance | 385 | 1785 | 2385 | 2385 | 20 |
Expand All @@ -51,19 +51,19 @@
| Function Name | min | avg | median | max | # calls |
| acceptMigration | 35258 | 35258 | 35258 | 35258 | 2 |
| leave | 35244 | 35244 | 35244 | 35244 | 1 |
| lock | 45387 | 74829 | 66590 | 155519 | 6 |
| owner | 362 | 362 | 362 | 362 | 20088 |
| stake | 27265 | 268735 | 267622 | 353853 | 20093 |
| lock | 45192 | 73900 | 66395 | 158442 | 7 |
| owner | 362 | 362 | 362 | 362 | 18425 |
| stake | 27265 | 268849 | 267631 | 353862 | 18430 |
| stakedToken | 212 | 212 | 212 | 212 | 2 |
| unstake | 42163 | 92145 | 80441 | 204532 | 11 |
| unstake | 42163 | 92598 | 80285 | 207456 | 11 |


| contracts/VaultFactory.sol:VaultFactory contract | | | | | |
|--------------------------------------------------|-----------------|--------|--------|--------|---------|
| Deployment Cost | Deployment Size | | | | |
| 0 | 0 | | | | |
| Function Name | min | avg | median | max | # calls |
| createVault | 696531 | 696531 | 696531 | 696531 | 20092 |
| createVault | 696531 | 696531 | 696531 | 696531 | 18429 |
| setStakeManager | 23710 | 26669 | 26076 | 30222 | 3 |
| stakeManager | 368 | 1868 | 2368 | 2368 | 4 |

Expand All @@ -73,32 +73,32 @@
| Deployment Cost | Deployment Size | | | | |
| 0 | 0 | | | | |
| Function Name | min | avg | median | max | # calls |
| approve | 46175 | 46198 | 46199 | 46211 | 20088 |
| balanceOf | 561 | 600 | 561 | 2561 | 46710 |
| approve | 46175 | 46198 | 46199 | 46211 | 18425 |
| balanceOf | 561 | 603 | 561 | 2561 | 43385 |


| script/Deploy.s.sol:Deploy contract | | | | | |
|-------------------------------------|-----------------|---------|---------|---------|---------|
| Deployment Cost | Deployment Size | | | | |
| 6515986 | 31374 | | | | |
| 6532373 | 31450 | | | | |
| Function Name | min | avg | median | max | # calls |
| run | 5737391 | 5737391 | 5737391 | 5737391 | 55 |
| run | 5752636 | 5752636 | 5752636 | 5752636 | 56 |


| script/DeployMigrationStakeManager.s.sol:DeployMigrationStakeManager contract | | | | | |
|-------------------------------------------------------------------------------|-----------------|---------|---------|---------|---------|
| Deployment Cost | Deployment Size | | | | |
| 3679431 | 18142 | | | | |
| 3695815 | 18218 | | | | |
| Function Name | min | avg | median | max | # calls |
| run | 2723061 | 2723061 | 2723061 | 2723061 | 9 |
| run | 2738306 | 2738306 | 2738306 | 2738306 | 9 |


| script/DeploymentConfig.s.sol:DeploymentConfig contract | | | | | |
|---------------------------------------------------------|-----------------|-----|--------|-----|---------|
| Deployment Cost | Deployment Size | | | | |
| 0 | 0 | | | | |
| Function Name | min | avg | median | max | # calls |
| activeNetworkConfig | 455 | 455 | 455 | 455 | 110 |
| activeNetworkConfig | 455 | 455 | 455 | 455 | 112 |


| test/mocks/BrokenERC20.s.sol:BrokenERC20 contract | | | | | |
Expand All @@ -113,9 +113,9 @@
| test/script/DeployBroken.s.sol:DeployBroken contract | | | | | |
|------------------------------------------------------|-----------------|---------|---------|---------|---------|
| Deployment Cost | Deployment Size | | | | |
| 5200705 | 25172 | | | | |
| 5217091 | 25248 | | | | |
| Function Name | min | avg | median | max | # calls |
| run | 4577212 | 4577212 | 4577212 | 4577212 | 1 |
| run | 4592458 | 4592458 | 4592458 | 4592458 | 1 |



Expand Down
55 changes: 28 additions & 27 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,56 +1,57 @@
CreateVaultTest:testDeployment() (gas: 9774)
CreateVaultTest:test_createVault() (gas: 692936)
ExecuteAccountTest:testDeployment() (gas: 28742)
ExecuteAccountTest:test_ExecuteAccountLimit() (gas: 1338316)
ExecuteAccountTest:test_ExecuteAccountMintMP() (gas: 3857142)
ExecuteAccountTest:test_RevertWhen_InvalidLimitEpoch() (gas: 1154374)
ExecuteAccountTest:test_ShouldNotMintMoreThanCap() (gas: 110607467)
ExecuteAccountTest:test_ExecuteAccountLimit() (gas: 1318328)
ExecuteAccountTest:test_ExecuteAccountMintMP() (gas: 3861122)
ExecuteAccountTest:test_RevertWhen_InvalidLimitEpoch() (gas: 1154383)
ExecuteAccountTest:test_ShouldNotMintMoreThanCap() (gas: 110701476)
ExecuteEpochTest:testDeployment() (gas: 28720)
ExecuteEpochTest:testNewDeployment() (gas: 30815)
ExecuteEpochTest:test_ExecuteEpochShouldIncreaseEpoch() (gas: 94810)
ExecuteEpochTest:test_ExecuteEpochShouldIncreasePendingReward() (gas: 253041)
ExecuteEpochTest:test_ExecuteEpochShouldNotIncreaseEpochBeforeEnd() (gas: 17972)
ExecuteEpochTest:test_ExecuteEpochShouldNotIncreaseEpochInMigration() (gas: 105698)
LeaveTest:testDeployment() (gas: 28720)
LeaveTest:test_RevertWhen_NoPendingMigration() (gas: 1154630)
LeaveTest:test_RevertWhen_NoPendingMigration() (gas: 1154639)
LeaveTest:test_RevertWhen_SenderIsNotVault() (gas: 10750)
LockTest:testDeployment() (gas: 28720)
LockTest:test_NewLockupPeriod() (gas: 1143383)
LockTest:test_RevertWhen_InvalidNewLockupPeriod() (gas: 1135000)
LockTest:test_RevertWhen_InvalidUpdateLockupPeriod() (gas: 1231009)
LockTest:test_NewLockupPeriod() (gas: 1143197)
LockTest:test_RevertWhen_InvalidNewLockupPeriod() (gas: 1134814)
LockTest:test_RevertWhen_InvalidUpdateLockupPeriod() (gas: 1229677)
LockTest:test_RevertWhen_SenderIsNotVault() (gas: 10630)
LockTest:test_ShouldIncreaseBonusMP() (gas: 1123483)
LockTest:test_UpdateLockupPeriod() (gas: 1280388)
LockTest:test_ShouldIncreaseBonusMP() (gas: 1123297)
LockTest:test_UpdateLockupPeriod() (gas: 1260010)
MigrateTest:testDeployment() (gas: 28720)
MigrateTest:test_RevertWhen_NoPendingMigration() (gas: 1152269)
MigrateTest:test_RevertWhen_NoPendingMigration() (gas: 1152278)
MigrateTest:test_RevertWhen_SenderIsNotVault() (gas: 10750)
MigrationInitializeTest:testDeployment() (gas: 28720)
MigrationInitializeTest:test_RevertWhen_MigrationPending() (gas: 5476473)
MigrationInitializeTest:test_RevertWhen_MigrationPending() (gas: 5506950)
MigrationStakeManagerTest:testDeployment() (gas: 28720)
MigrationStakeManagerTest:testNewDeployment() (gas: 30859)
MigrationStakeManagerTest:test_ExecuteEpochShouldNotIncreaseEpochInMigration() (gas: 105686)
SetStakeManagerTest:testDeployment() (gas: 9774)
SetStakeManagerTest:test_RevertWhen_InvalidStakeManagerAddress() (gas: 20481)
SetStakeManagerTest:test_SetStakeManager() (gas: 19869)
StakeManagerTest:testDeployment() (gas: 28492)
StakeTest:testDeployment() (gas: 28720)
StakeTest:test_RevertWhen_InvalidLockupPeriod() (gas: 892125)
StakeTest:test_RevertWhen_Restake() (gas: 1157942)
StakeTest:test_RevertWhen_RestakeWithLock() (gas: 1159410)
StakeTest:test_RevertWhen_SenderIsNotVault() (gas: 10651)
StakeTest:test_RevertWhen_StakeIsTooLow() (gas: 745253)
StakeTest:testDeployment() (gas: 28698)
StakeTest:test_RevertWhen_InvalidLockupPeriod() (gas: 892168)
StakeTest:test_RevertWhen_Restake() (gas: 1157929)
StakeTest:test_RevertWhen_RestakeWithLock() (gas: 1159442)
StakeTest:test_RevertWhen_SenderIsNotVault() (gas: 10674)
StakeTest:test_RevertWhen_StakeIsTooLow() (gas: 745276)
StakeTest:test_RevertWhen_StakeTokenTransferFails() (gas: 175040)
StakeTest:test_StakeWithoutLockUpTimeMintsMultiplierPoints() (gas: 1029011)
StakeTest:test_StakeWithLockBonusMP() (gas: 2023009)
StakeTest:test_StakeWithoutLockUpTimeMintsMultiplierPoints() (gas: 1028803)
StakedTokenTest:testStakeToken() (gas: 7616)
UnstakeTest:testDeployment() (gas: 28742)
UnstakeTest:test_RevertWhen_AmountMoreThanBalance() (gas: 1132884)
UnstakeTest:test_RevertWhen_FundsLocked() (gas: 1158036)
UnstakeTest:test_RevertWhen_AmountMoreThanBalance() (gas: 1132893)
UnstakeTest:test_RevertWhen_FundsLocked() (gas: 1158045)
UnstakeTest:test_RevertWhen_SenderIsNotVault() (gas: 10653)
UnstakeTest:test_UnstakeShouldBurnMultiplierPoints() (gas: 5497028)
UnstakeTest:test_UnstakeShouldReturnFund_NoLockUp() (gas: 1026491)
UnstakeTest:test_UnstakeShouldReturnFund_WithLockUp() (gas: 1115090)
UnstakeTest:test_UnstakeShouldBurnMultiplierPoints() (gas: 5535329)
UnstakeTest:test_UnstakeShouldReturnFund_NoLockUp() (gas: 1026305)
UnstakeTest:test_UnstakeShouldReturnFund_WithLockUp() (gas: 1113953)
UserFlowsTest:testDeployment() (gas: 28720)
UserFlowsTest:test_PendingMPToBeMintedCannotBeGreaterThanTotalSupplyMP(uint8) (runs: 1001, μ: 71037060, ~: 31077253)
UserFlowsTest:test_StakeWithLockUpTimeLocksStake() (gas: 1115978)
UserFlowsTest:test_StakedSupplyShouldIncreaseAndDecreaseAgain() (gas: 1950739)
UserFlowsTest:test_PendingMPToBeMintedCannotBeGreaterThanTotalSupplyMP(uint8) (runs: 1000, μ: 70728281, ~: 30142776)
UserFlowsTest:test_StakeWithLockUpTimeLocksStake() (gas: 1114841)
UserFlowsTest:test_StakedSupplyShouldIncreaseAndDecreaseAgain() (gas: 1950367)
VaultFactoryTest:testDeployment() (gas: 9774)
Loading