-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(contract): Optimizations and clean ups (#637)
Replaced internal `IERC165` imports with those from OpenZeppelin, and renamed a local interface for better clarity. Additionally, refactored `IntrospectionHelper` contract initialization to improve code readability and consistency. Refactor internal deploy functions to use memory-safe assembly and add explicit reverts on failure. Integrate `LibClone` for address prediction to improve clarity and reliability. Refactor loops to improve performance by reducing redundant evaluations and increasing readability. Added `unchecked` blocks for vote counting to minimize gas usage. Streamlined the fetching of rule data directly within return statements. Modified function parameters to use `calldata` over `memory` for better gas efficiency. This change impacts functions in both `Architect.sol` and `ArchitectBase.sol` enhancing performance by reducing the cost of memory allocation. Changed the method to use `membership.settings` directly, significantly reducing code redundancy. Also ensured `feeRecipient` defaults to `msg.sender` if unset, maintaining intended functionality while improving code readability.
- Loading branch information
Showing
11 changed files
with
63 additions
and
79 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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