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

feat:add support for delegate calltype #108

Merged
merged 12 commits into from
Jul 7, 2024

Conversation

livingrockrises
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Jul 5, 2024

Changes to gas cost

Generated at commit: c030b76496c6644e2c5d71a96faf64fd480cfe5c, compared to commit: 5902a68b35c9b6de2e4786f34272f66b98041a7e

🧾 Summary (5% most significant diffs)

Contract Method Avg (+/-) %
Nexus executeFromExecutor +23 ❌ +0.12%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
MockExecutor 944,236 (+90,841) isModuleType 369 (+21) +6.03% 369 (+21) +6.03% 369 (+21) +6.03% 369 (+21) +6.03% 12 (0)
Nexus 5,401,460 (+147,295) execute
executeFromExecutor
installModule
uninstallModule
6,212 (+9)
14,529 (+44)
32,441 (0)
8,104 (0)
+0.15%
+0.30%
0.00%
0.00%
48,985 (+18)
19,803 (+23)
38,267 (+21)
10,250 (+3)
+0.04%
+0.12%
+0.05%
+0.03%
37,912 (+9)
19,610 (+21)
39,969 (+43)
9,883 (+11)
+0.02%
+0.11%
+0.11%
+0.11%
142,990 (+9)
25,465 (+6)
43,756 (0)
12,765 (0)
+0.01%
+0.02%
0.00%
0.00%
76 (0)
4 (0)
23 (0)
6 (0)

Copy link

openzeppelin-code bot commented Jul 5, 2024

feat:add support for delegate calltype

Generated at commit: ef1949ac8344ff0d24b5e2d5333042321cca9c35

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
0
1
0
6
24
31

For more details view the full report in OpenZeppelin Code Inspector

Copy link

codecov bot commented Jul 5, 2024

Codecov Report

Attention: Patch coverage is 77.19298% with 13 lines in your changes missing coverage. Please review.

Project coverage is 87.29%. Comparing base (5b2b5dd) to head (48176cb).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #108      +/-   ##
==========================================
- Coverage   88.97%   87.29%   -1.68%     
==========================================
  Files          13       13              
  Lines         526      559      +33     
  Branches      137      122      -15     
==========================================
+ Hits          468      488      +20     
- Misses         56       69      +13     
  Partials        2        2              
Files Coverage Δ
contracts/Nexus.sol 86.71% <100.00%> (-1.40%) ⬇️
contracts/base/ExecutionHelper.sol 75.71% <72.91%> (-6.11%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5902a68...48176cb. Read the comment docs.

Copy link
Collaborator

@filmakarov filmakarov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest introducing changes described above

As well as adding at least a couple of tests to make sure both _executeDelegatecall and _tryExecuteDelegatecall actually work

.solhint.json Outdated Show resolved Hide resolved
contracts/Nexus.sol Outdated Show resolved Hide resolved
contracts/Nexus.sol Outdated Show resolved Hide resolved
contracts/Nexus.sol Outdated Show resolved Hide resolved
@livingrockrises
Copy link
Contributor Author

hardhat tests are failing. converting this to draft

@livingrockrises livingrockrises marked this pull request as draft July 6, 2024 12:01
@livingrockrises livingrockrises marked this pull request as ready for review July 7, 2024 08:47
@filmakarov filmakarov self-requested a review July 7, 2024 15:53
Copy link
Collaborator

@filmakarov filmakarov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🙏

p.s. please note, there are linting errors

@livingrockrises
Copy link
Contributor Author

I suggest introducing changes described above

As well as adding at least a couple of tests to make sure both _executeDelegatecall and _tryExecuteDelegatecall actually work

I will add one for try as well.

Copy link

github-actions bot commented Jul 7, 2024

🤖 Slither Analysis Report 🔎

Slither report

# Slither report

THIS CHECKLIST IS NOT COMPLETE. Use --show-ignored-findings to show all the results.
Summary

constable-states

Impact: Optimization
🔴 Confidence: High

base/RegistryAdapter.sol#L12

factory/RegistryFactory.sol#L39

_This comment was automatically generated by the GitHub Actions workflow._

@livingrockrises livingrockrises merged commit f6313e6 into dev Jul 7, 2024
9 of 10 checks passed
@livingrockrises livingrockrises deleted the feat/add-delegate-call-type branch July 7, 2024 17: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.

None yet

2 participants