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

Delete unused function #1043

Merged

Conversation

StanislavBreadless
Copy link
Collaborator

What ❔

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

Copy link

Changes to gas cost

Generated at commit: 47798a29f9409111e3741c166dfbcd7a2c7bb0e4, compared to commit: 96d42f2c3a63d14417e59f3e1269227c6f819bcf

🧾 Summary (100% most significant diffs)

Contract Method Avg (+/-) %
DummyBridgehubSetter addChainTypeManager
createNewChain
requestL2TransactionDirect
requestL2TransactionTwoBridges
setCTM
setZKChain
+3 ❌
-2,328 ✅
+594 ❌
-80 ✅
-1 ✅
-1 ✅
+0.01%
-2.14%
+0.50%
-0.05%
-0.00%
-0.00%
ChainTypeManager forwardedBridgeMint
getHyperchain
-22 ✅
-22 ✅
-0.00%
-0.34%
DummyChainTypeManagerWBH owner
setZKChain
+22 ❌
+22 ❌
+0.89%
+0.05%
TransparentUpgradeableProxy createNewChain
getHyperchain
setAllowedData
validatorTimelock
-7 ✅
-22 ✅
+9 ❌
-22 ✅
-0.00%
-0.31%
+0.02%
-0.41%
ChainAdmin setUpgradeTimestamp +76 ❌ +0.17%
DiamondProxy finalizeEthWithdrawal
requestL2Transaction
+128 ❌
0 ➖
+0.16%
0.00%
MerkleTest calculateRoot(bytes32[],uint256,bytes32) +1 ❌ +0.03%
TestnetERC20Token transfer +6 ❌ +0.01%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
DummyBridgehubSetter 4,350,895 (0) addChainTypeManager
createNewChain
proveL1ToL2TransactionStatus
proveL2MessageInclusion
removeChainTypeManager
requestL2TransactionDirect
requestL2TransactionTwoBridges
setAddresses
setCTM
setPendingAdmin
setZKChain
23,895 (-12)
28,721 (-60)
0 (0)
0 (0)
23,854 (0)
33,032 (-9)
31,035 (0)
24,370 (0)
44,232 (0)
25,999 (0)
111,369 (0)
-0.05%
-0.21%
+∞%
+∞%
0.00%
-0.03%
0.00%
0.00%
0.00%
0.00%
0.00%
44,149 (+3)
106,303 (-2,328)
1,387 (+4)
1,615 (+48)
25,490 (+5)
118,684 (+594)
151,349 (-80)
66,087 (+2)
44,269 (-1)
47,719 (-3)
111,406 (-1)
+0.01%
-2.14%
+0.29%
+3.06%
+0.02%
+0.50%
-0.05%
+0.00%
-0.00%
-0.01%
-0.00%
47,621 (0)
36,509 (0)
988 (-3)
1,197 (+6)
25,854 (0)
95,208 (-871)
47,099 (+42)
71,227 (0)
44,280 (-12)
49,885 (0)
111,417 (-12)
0.00%
0.00%
-0.30%
+0.50%
0.00%
-0.91%
+0.09%
0.00%
-0.03%
0.00%
-0.01%
47,621 (0)
885,166 (+9,906)
3,625 (-14)
4,055 (+14)
26,266 (0)
296,387 (-5,616)
434,766 (+96)
91,367 (0)
44,292 (0)
49,897 (0)
111,429 (0)
0.00%
+1.13%
-0.38%
+0.35%
0.00%
-1.86%
+0.02%
0.00%
0.00%
0.00%
0.00%
6,656 (0)
2,560 (0)
512 (0)
512 (0)
2,048 (0)
1,024 (0)
1,536 (0)
3,328 (0)
2,816 (0)
4,864 (0)
2,816 (0)
ChainTypeManager 3,735,015 (-46,318) forwardedBridgeMint
getHyperchain
validatorTimelock
3,160,368 (-22)
6,388 (-22)
425 (-22)
-0.00%
-0.34%
-4.92%
3,160,368 (-22)
6,388 (-22)
1,425 (-22)
-0.00%
-0.34%
-1.52%
3,160,368 (-22)
6,388 (-22)
1,425 (-22)
-0.00%
-0.34%
-1.52%
3,160,368 (-22)
6,388 (-22)
2,425 (-22)
-0.00%
-0.34%
-0.90%
3 (0)
23 (0)
4 (0)
DummyChainTypeManagerWBH 3,757,044 (-46,326) owner
setZKChain
2,485 (+22)
44,123 (+22)
+0.89%
+0.05%
2,485 (+22)
44,162 (+22)
+0.89%
+0.05%
2,485 (+22)
44,183 (+22)
+0.89%
+0.05%
2,485 (+22)
44,183 (+22)
+0.89%
+0.05%
256 (0)
256 (0)
TransparentUpgradeableProxy 644,397 (0) createNewChain
getHyperchain
setAllowedAdminImplementation
setAllowedData
setSelectorShouldBeValidated
validatorTimelock
55,179 (0)
7,019 (-22)
54,675 (0)
55,405 (0)
54,726 (0)
1,053 (-22)
0.00%
-0.31%
0.00%
0.00%
0.00%
-2.05%
2,814,758 (-7)
7,019 (-22)
54,920 (+12)
56,465 (+9)
54,757 (-1)
5,303 (-22)
-0.00%
-0.31%
+0.02%
+0.02%
-0.00%
-0.41%
3,365,014 (-12)
7,019 (-22)
55,047 (0)
56,110 (+36)
54,774 (0)
5,303 (-22)
-0.00%
-0.31%
0.00%
+0.06%
0.00%
-0.41%
3,543,999 (0)
7,019 (-22)
55,047 (0)
58,225 (+36)
54,774 (0)
9,553 (-22)
0.00%
-0.31%
0.00%
+0.06%
0.00%
-0.23%
11 (0)
23 (0)
258 (0)
257 (0)
258 (0)
4 (0)
MailboxFacet 2,681,325 (0) finalizeEthWithdrawal 8,251 (0) 0.00% 52,068 (+123) +0.24% 52,735 (0) 0.00% 52,735 (0) 0.00% 257 (0)
ChainAdmin 835,016 (0) setUpgradeTimestamp 25,361 (0) 0.00% 45,241 (+76) +0.17% 45,333 (-12) -0.03% 45,645 (0) 0.00% 256 (0)
DiamondProxy 2,405,277 (0) finalizeEthWithdrawal
requestL2Transaction
util_setChainId
37,779 (0)
33,295 (0)
28,944 (0)
0.00%
0.00%
0.00%
79,394 (+128)
131,434 (0)
33,782 (-5)
+0.16%
0.00%
-0.01%
80,003 (+12)
170,024 (+24)
33,756 (0)
+0.02%
+0.01%
0.00%
80,291 (0)
191,977 (0)
34,128 (0)
0.00%
0.00%
0.00%
257 (0)
771 (0)
519 (0)
MerkleTest 436,733 (0) calculateRoot(bytes32[],uint256,bytes32) 571 (0) 0.00% 2,930 (+1) +0.03% 2,982 (0) 0.00% 3,037 (+11) +0.36% 265 (0)
AccessControlRestriction 1,357,213 (0) grantRole
setRequiredRoleForCall
setRequiredRoleForFallback
51,277 (0)
24,360 (0)
24,219 (0)
0.00%
0.00%
0.00%
51,508 (-6)
45,726 (-10)
45,250 (+3)
-0.01%
-0.02%
+0.01%
51,649 (0)
49,094 (0)
48,444 (0)
0.00%
0.00%
0.00%
51,649 (0)
54,114 (0)
53,925 (0)
0.00%
0.00%
0.00%
1,024 (0)
1,536 (0)
1,536 (0)
TestnetERC20Token 640,427 (0) approve
mint
transfer
24,272 (0)
34,031 (0)
46,377 (0)
0.00%
0.00%
0.00%
46,259 (+7)
61,798 (+6)
46,723 (+6)
+0.02%
+0.01%
+0.01%
46,232 (0)
68,255 (0)
46,677 (+12)
0.00%
0.00%
+0.03%
46,568 (0)
68,615 (0)
46,977 (0)
0.00%
0.00%
0.00%
1,527 (0)
1,704 (0)
257 (0)
TestPermanentRestriction 1,450,178 (0) setAllowedData 26,796 (0) 0.00% 27,239 (+3) +0.01% 27,067 (0) 0.00% 27,880 (0) 0.00% 257 (0)
MerkleTreeNoSort 534,636 (0) getProof 2,594 (0) 0.00% 32,739 (-3) -0.01% 33,193 (0) 0.00% 33,215 (0) 0.00% 277 (0)
L1Nullifier 2,603,615 (-12)
DummyChainTypeManager 3,755,282 (-46,338)
DummyZKChain 2,888,058 (-12)
ValidatorTimelock 793,785 (+12)
DeployL1Script 58,529,396 (-47,939)
TestExecutorFacet 2,734,330 (+12)

@StanislavBreadless StanislavBreadless merged commit 85046c1 into gateway-release-candidate Oct 29, 2024
25 checks passed
@StanislavBreadless StanislavBreadless deleted the sb-delete-unused-function branch October 29, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant