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/erc 7579 interfaces #12

Merged
merged 31 commits into from
Feb 21, 2024
Merged

Feat/erc 7579 interfaces #12

merged 31 commits into from
Feb 21, 2024

Conversation

Aboudjem
Copy link
Contributor

@Aboudjem Aboudjem commented Feb 19, 2024

Changes Made:

  1. Finished setting up the repo with key configs and best practices for smoother dev workflow
  2. Started writing tests for our smart contracts. Note: Current tests are intentionally wrong to hit 100% coverage on CI checks. This is a starting point for real tests later.
  3. Added utils (utility functions) to help with common dev tasks.
  4. Imported Entrypoint v0.7.0, ensuring we're up-to-date with the latest userOps
  5. Created functions to build PackedUserOps to make it easier for our tests.
  6. Set up CI scripts for automated testing and checks + branch naming
  7. Initial goal was to add interfaces, but I expanded the work to include more improvements and new features.
  8. Added .gitignore updates to keep our repo clean of unnecessary files.
  9. Adjusted .solhint.json and .prettierrc for better linting and formatting
  10. Removed unused contracts and tests from template
  11. Introduced ERC-7579 interfaces + basic very implementation
  12. Deployed SmartAccount contract as part of our core functionality.
  13. Created a consolidated Imports.sol for import for testing.
  14. Initiated a base for SmartAccount testing, aiming for comprehensive coverage from the start.
  15. Introduced erc7201 namespaced storage

I made important changes to ensure a solid foundation for our project. I focused on good practices and setting up everything we need to start developing effectively. These updates are just the beginning and meant to provide a good start

Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c0292de) 100.00% compared to head (9edc594) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev       #12   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         6    +4     
  Lines           11        42   +31     
  Branches         3         0    -3     
=========================================
+ Hits            11        42   +31     
Flag Coverage Δ
foundry 100.00% <100.00%> (ø)
hardhat 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* @param mode The encoded execution mode of the transaction.
* @param executionCalldata The encoded execution call data.
*/
function execute(bytes32 mode, bytes calldata executionCalldata) external payable {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is like standard executor? execute and executeBatch which comes by default. I don't see executeBatch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is part of the ERC7579, mode can be batch and then the calldata will be executed accordingly


import { PackedUserOperation } from "account-abstraction/contracts/interfaces/PackedUserOperation.sol";

contract Validator {
Copy link
Contributor

Choose a reason for hiding this comment

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

aren't these interfaces or abstract contracts?

Copy link
Contributor Author

@Aboudjem Aboudjem Feb 20, 2024

Choose a reason for hiding this comment

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

It's just importing the PackedUserOperation struct

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean contract Validator

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.24;

import { EntryPoint } from "account-abstraction/contracts/core/EntryPoint.sol";
Copy link
Contributor

Choose a reason for hiding this comment

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

how are we importing? from sub-module? and branch=develop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes
"account-abstraction": "github:eth-infinitism/account-abstraction#develop",

I've added this as devDep

and remapped it

account-abstraction/=node_modules/account-abstraction/ for forge usage

import { ModuleConfig } from "./Account/ModuleConfig.sol";
import { Validator } from "./Account/Validator.sol";

contract SmartAccount is AccountConfig, Execution, ModuleConfig, Validator {
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree we can combine Execution and Validator into account and just use interfaces to be kept in ISmartAccount. if that's not strict requirement by ERC

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I separated them because Validator is part of ERC4337, and Execution is part of ERC7579

* @param encodedMode The encoded mode.
* @return True if the account supports the mode, false otherwise.
*/
function supportsAccountMode(bytes32 encodedMode) external view returns (bool);
Copy link
Contributor

Choose a reason for hiding this comment

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

would suggest renaming this to something which makes more sense as per natspecs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this part of the erc7579, do you have any naming in mind?

Copy link
Contributor

Choose a reason for hiding this comment

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

accountSupportsMode ??

* 👷 Add Slither analysis workflow

* ♻️ Update Slither workflow to include Foundry installation***

* Add permissions and update Slither configuration

* Update Slither workflow to ensure tool availability

* Update Slither workflow

* Add Slither workflow to run static analysis

* 💚 add yarn.lock

* ✨ Update Slither workflow to include Node.js setup and SARIF report generation

* Remove SARIF file upload step in slither.yml

* Update Slither configuration in workflow

* 🚧 Update Slither workflow to include Foundry installation and contract building

* Remove target directory for analysis in slither.yml workflow

* 🚑 Update Slither workflow to include SARIF file upload

* Add token to SARIF file upload

* Add comment.js and update slither.yml workflow

* Update node version in slither.yml

* Update Slither workflow to fail on medium severity issues

* Add target directory for Slither analysis

* Update slither.yml with filter paths for mock contracts

* Update slither-args in slither.yml

* Fix slither-args path in GitHub workflow

* Update slither configuration to exclude node_modules directory

* Update slither-args in slither.yml workflow

* Update Slither version to 0.10.0

* Update slither.yml to fail on no severity issues

* Add check for pull request event in comment.js
* Update GitHub Actions workflow to trigger on pull requests

* Update Slither workflow permissions and arguments

* Refactor CI workflow and remove redundant coverage and slither workflows

* Update Node.js and Foundry versions

* Add Foundry to PATH

* Update CI workflow to install lcov and make other improvements

* Add cache for Foundry Toolchain

* Update CI workflow configuration

* Refactor GitHub Actions workflow***

* Update CI workflow to cache node_modules and Foundry toolchain

* Update CI workflow and add linting, unit tests, coverage, and static analysis

* Update cache keys and add Foundry toolchain

* Add Foundry cache key generation and ensure Foundry directory exists

* Update CI workflow and cache actions***

* Update CI workflow and dependencies

* Update CI workflow to install Foundry and generate coverage report

* Add lcov installation step and update Codecov upload for Foundry and Hardhat coverage reports

* Refactor CI workflow and add Slither analysis

* Update CI Workflow to include linting, unit tests, coverage, and slither analysis
Copy link

github-actions bot commented Feb 20, 2024

Slither report

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

locked-ether

Impact: Medium
Confidence: High

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/SmartAccount.sol#L9-L13

shadowing-local

Impact: Low
Confidence: High

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/Execution.sol#L36

assembly

Impact: Informational
Confidence: High

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/Storage.sol#L18-L22

solc-version

Impact: Informational
Confidence: High

  • ID-3
    Pragma version0.8.24 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/interfaces/IExecution.sol#L2

  • ID-4
    Pragma version0.8.24 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/AccountConfig.sol#L2

  • ID-5
    Pragma version0.8.24 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/interfaces/IModule.sol#L2

  • ID-6
    Pragma version>=0.8.24 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Mock/Entrypoint.sol#L2

  • ID-7
    Pragma version0.8.24 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/interfaces/IStorage.sol#L4

  • ID-8
    Pragma version0.8.24 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/SmartAccount.sol#L2

  • ID-9
    solc-0.8.24 is not recommended for deployment

  • ID-10
    Pragma version0.8.24 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/interfaces/IModuleConfig.sol#L2

  • ID-11
    Pragma version0.8.24 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/Validator.sol#L2

  • ID-12
    Pragma version0.8.24 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/Storage.sol#L2

  • ID-13
    Pragma version0.8.24 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/interfaces/IAccountConfig.sol#L2

  • ID-14
    Pragma version0.8.24 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/ModuleConfig.sol#L2

  • ID-15
    Pragma version0.8.24 necessitates a version too recent to be trusted. Consider deploying with 0.8.18.

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/Execution.sol#L2

redundant-statements

Impact: Informational
Confidence: High

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/ModuleConfig.sol#L52

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/Execution.sol#L34

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/Validator.sol#L44

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/Execution.sol#L15

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/ModuleConfig.sol#L30

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/Execution.sol#L16

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/ModuleConfig.sol#L17

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/AccountConfig.sol#L31

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/Execution.sol#L48

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/Execution.sol#L35

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/ModuleConfig.sol#L29

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/AccountConfig.sol#L21

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/Execution.sol#L47

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/ModuleConfig.sol#L18

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/Validator.sol#L43

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/Validator.sol#L42

https://github.com/bcnmy/erc7579-modular-smart-account/blob/5b91eb6228f131db1a59ab658512329642619534/contracts/contracts/Account/ModuleConfig.sol#L51

@Aboudjem Aboudjem merged commit fa0dcf8 into dev Feb 21, 2024
9 checks passed
@Aboudjem Aboudjem deleted the feat/erc-7579-interfaces branch February 21, 2024 11:19
Aboudjem added a commit that referenced this pull request Mar 8, 2024
* 🎨 init repo

* 👷 update ci

* 🎨 update badges

* Feat/add husky (#4)

* Add husky for Git hooks

* 🚧 add branch naming check

* ✅Add Git hooks for branch name validation

* 💚 Update pre-push script to remove unnecessary line

* Add branch name validation checks for dev and main branches

* 🚧 Update branch naming check workflow

* 👷 Add PR Automation Workflow (#6)

* Release/0.1.0 (#9)

* 🔖 Update package.json version to 0.1.0

* 💚 Fix versioning check in automation workflow

* ⚡️ Fix CI/CD workflows and update changelog

* 💚 Sync release branch to dev and create automated PR

* Update versioning check in automation workflow

* 💚 Update automation_workflow.yml to check for changes in package.json and CHANGELOG.md

* Refactor workflow to check for updated files

* Refactor code to improve performance and readability

* Add LICENSE file to GitHub Actions workflow

* 💚 Update automation workflow to check for changed files

* Update automation_workflow.yml to check for changes in package.json and CHANGELOG.md files

* Add checks for package.json, CHANGELOG.md, and LICENSE files

* Refactor verification logic in automation workflow

* Update automation_workflow.yml to verify changes in CHANGELOG.md file

* 💚 Add automation workflow for creating PRs to dev and main branches

* Update GitHub Actions versions

* 💚 Update automation_workflow.yml to use dynamic branch names

* Update GitHub token in automation_workflow.yml

* Refactor automation workflow to remove unnecessary steps

* Feat/erc 7579 interfaces (#12)

* 🙈 Add cache_forge to .gitignore

* Add .husky to .gitignore

* 🎨 Update tab width to 4 spaces in .prettierrc

* 🚧 Disable no-inline-assembly rule in .solhint.json

* ⚡️ Add account-abstraction dependency and update husky hooks

* 🔥 Remove Git hooks for branch name validation

* 🔧 Update tsconfig.json to disable strict mode

* 🎨 Update Solidity version and remappings, delete unused contracts and tests

* 🙈 Add .vscode/settings.json to .gitignore

* 🔥 Delete unused contracts and tests

* ✨ Add utility functions for conversion and formatting

* ✨ Add buildUserOp function to utils.ts

* ✨ Add git hook to check branch names

* ✨ Add SmartAccount contract

* ✨ Add AccountConfig contract implementation

* ✨ Add Execution contract for account execution

* ✨ Add ModuleConfig contract for managing modules

* ✨ Add Storage contract for isolated storage access

* ✨ Add Validator contract for user operation validation

* ⚡️ Add ERC-7579 interfaces for smart account configuration, execution, module, and module configuration

* ✨ Add IStorage interface for ERC20 account storage

* 🚀 Add deployment of SmartAccount contract

* 🚧 Update import statement and variable name in Deploy script

* ⚡️ Add Entrypoint 0.7.0

* ⚡️ Add Imports.sol for consolidated imports

* ✅ Add SmartAccount test file

* 👷 Remove unnecessary branch from PR Automation Workflow

* ✏️ Update storage location for SmartAccount in contracts

* Feat/slither (#14)

* 👷 Add Slither analysis workflow

* ♻️ Update Slither workflow to include Foundry installation***

* Add permissions and update Slither configuration

* Update Slither workflow to ensure tool availability

* Update Slither workflow

* Add Slither workflow to run static analysis

* 💚 add yarn.lock

* ✨ Update Slither workflow to include Node.js setup and SARIF report generation

* Remove SARIF file upload step in slither.yml

* Update Slither configuration in workflow

* 🚧 Update Slither workflow to include Foundry installation and contract building

* Remove target directory for analysis in slither.yml workflow

* 🚑 Update Slither workflow to include SARIF file upload

* Add token to SARIF file upload

* Add comment.js and update slither.yml workflow

* Update node version in slither.yml

* Update Slither workflow to fail on medium severity issues

* Add target directory for Slither analysis

* Update slither.yml with filter paths for mock contracts

* Update slither-args in slither.yml

* Fix slither-args path in GitHub workflow

* Update slither configuration to exclude node_modules directory

* Update slither-args in slither.yml workflow

* Update Slither version to 0.10.0

* Update slither.yml to fail on no severity issues

* Add check for pull request event in comment.js

* Update GitHub Actions workflow to trigger on pull requests (#15)

* Update GitHub Actions workflow to trigger on pull requests

* Update Slither workflow permissions and arguments

* Refactor CI workflow and remove redundant coverage and slither workflows

* Update Node.js and Foundry versions

* Add Foundry to PATH

* Update CI workflow to install lcov and make other improvements

* Add cache for Foundry Toolchain

* Update CI workflow configuration

* Refactor GitHub Actions workflow***

* Update CI workflow to cache node_modules and Foundry toolchain

* Update CI workflow and add linting, unit tests, coverage, and static analysis

* Update cache keys and add Foundry toolchain

* Add Foundry cache key generation and ensure Foundry directory exists

* Update CI workflow and cache actions***

* Update CI workflow and dependencies

* Update CI workflow to install Foundry and generate coverage report

* Add lcov installation step and update Codecov upload for Foundry and Hardhat coverage reports

* Refactor CI workflow and add Slither analysis

* Update CI Workflow to include linting, unit tests, coverage, and slither analysis

* Refactor CI workflow and update Slither analysis

* [WIP] Refactor and Start implementing methods (#17)

* 🙈 Add cache_forge to .gitignore

* Add .husky to .gitignore

* 🎨 Update tab width to 4 spaces in .prettierrc

* 🚧 Disable no-inline-assembly rule in .solhint.json

* ⚡️ Add account-abstraction dependency and update husky hooks

* 🔥 Remove Git hooks for branch name validation

* 🔧 Update tsconfig.json to disable strict mode

* 🎨 Update Solidity version and remappings, delete unused contracts and tests

* 🙈 Add .vscode/settings.json to .gitignore

* 🔥 Delete unused contracts and tests

* ✨ Add utility functions for conversion and formatting

* ✨ Add buildUserOp function to utils.ts

* ✨ Add git hook to check branch names

* ✨ Add SmartAccount contract

* ✨ Add AccountConfig contract implementation

* ✨ Add Execution contract for account execution

* ✨ Add ModuleConfig contract for managing modules

* ✨ Add Storage contract for isolated storage access

* ✨ Add Validator contract for user operation validation

* ⚡️ Add ERC-7579 interfaces for smart account configuration, execution, module, and module configuration

* ✨ Add IStorage interface for ERC20 account storage

* 🚀 Add deployment of SmartAccount contract

* 🚧 Update import statement and variable name in Deploy script

* ⚡️ Add Entrypoint 0.7.0

* ⚡️ Add Imports.sol for consolidated imports

* ✅ Add SmartAccount test file

* 👷 Remove unnecessary branch from PR Automation Workflow

* ✏️ Update storage location for SmartAccount in contracts

* Feat/slither (#14)

* 👷 Add Slither analysis workflow

* ♻️ Update Slither workflow to include Foundry installation***

* Add permissions and update Slither configuration

* Update Slither workflow to ensure tool availability

* Update Slither workflow

* Add Slither workflow to run static analysis

* 💚 add yarn.lock

* ✨ Update Slither workflow to include Node.js setup and SARIF report generation

* Remove SARIF file upload step in slither.yml

* Update Slither configuration in workflow

* 🚧 Update Slither workflow to include Foundry installation and contract building

* Remove target directory for analysis in slither.yml workflow

* 🚑 Update Slither workflow to include SARIF file upload

* Add token to SARIF file upload

* Add comment.js and update slither.yml workflow

* Update node version in slither.yml

* Update Slither workflow to fail on medium severity issues

* Add target directory for Slither analysis

* Update slither.yml with filter paths for mock contracts

* Update slither-args in slither.yml

* Fix slither-args path in GitHub workflow

* Update slither configuration to exclude node_modules directory

* Update slither-args in slither.yml workflow

* Update Slither version to 0.10.0

* Update slither.yml to fail on no severity issues

* Add check for pull request event in comment.js

* Update GitHub Actions workflow to trigger on pull requests (#15)

* Update GitHub Actions workflow to trigger on pull requests

* Update Slither workflow permissions and arguments

* Refactor CI workflow and remove redundant coverage and slither workflows

* Update Node.js and Foundry versions

* Add Foundry to PATH

* Update CI workflow to install lcov and make other improvements

* Add cache for Foundry Toolchain

* Update CI workflow configuration

* Refactor GitHub Actions workflow***

* Update CI workflow to cache node_modules and Foundry toolchain

* Update CI workflow and add linting, unit tests, coverage, and static analysis

* Update cache keys and add Foundry toolchain

* Add Foundry cache key generation and ensure Foundry directory exists

* Update CI workflow and cache actions***

* Update CI workflow and dependencies

* Update CI workflow to install Foundry and generate coverage report

* Add lcov installation step and update Codecov upload for Foundry and Hardhat coverage reports

* Refactor CI workflow and add Slither analysis

* Update CI Workflow to include linting, unit tests, coverage, and slither analysis

* lint comment.js module

* prettier on branch name check and add comments

* Refactor CI workflow and update Slither analysis

* Refactor comment.js and ci.yml to improve Slither analysis report generation

* Add Module contract implementation

* Fix returnData initialization bug in Execution.sol and import IModule in Module.sol

* Refactor getEmoji function to use text instead of impact level

* Update TYPE_ID constant to uint256

* Refactor comment.js to add URL shortening and emoji processing

* Update constant declaration in Module.sol

* Refactor comment.js to improve readability and add emojis

* Refactor comment.js to improve URL shortening and emoji handling

* refactor, change acc id

* 🎨 further refactor. add module types

* ⚙️ validateUserOp implementation

* ✅ add execute via EP test

* Add remappings and solady module

* 📦 Add new dependencies and update existing ones

* 🔨 Update package.json with new check-branch-name script

* Add 'deployments' to .gitignore

* Add hardhat-deploy package

* Refactor comment.js

* Refactor buildUserOp function and add new utility functions

* Add UserOperation and PackedUserOperation interfaces

* 📦 Update dependencies in yarn.lock

* Update husky hooks in package.json

* 🔥 Remove unused contract files

* 🐛 revert remappings in remappings.txt due to issue with hh

* Remove duplicated account-abstraction dep

* Update import paths for PackedUserOperation

* Remove unused contracts and imports

* ♻️ Update AccountConfig implementation ID

* 🙈 Add .solcover.js configuration file

* 🙈 add solcover

* 🔥 remove utils

* 🔥 remove account.test.ts

* 🎨 improve code with interface

* ✨ add encoding utils function

* ✨ add helpers for operation

* 🔥 remove unused module

* 🚀 utils for deployment

* ✨ add Counter test contract

* ✅ add mockvalidator for test purpose

* 🎨 simplify Execution funcs for quick test

* ✨ add onInstall hook on moduleManager

* 🔥 remove empty useless contract

* 🚀 add basic AccountFactory

* 🎨 add interface for AccountFactory

* ✅ add deployment tests

* ✅ add configuration tests

* ✅ add module management tests

* ✅ add acc execution tests

* 🚨 lint fix

* chore: forge init

* forge install: forge-std

v1.7.6

* chore: forge init

* Delete CounterTest contract and related tests

* Remove submodule lib/forge-std

* 🔧 Update remappings in remappings.txt

* 📦 Add ds-test dependency

* 📦 Add ds-test dependency

* ✨ Add computeAccountAddress function to AccountFactory

* Add test function to ignore coverage of ModuleTypeLib.sol

* Add test function to MockValidator to ignore coverage

* Remove forge-std subproject

* Update import path for Script.sol

* ✨ Add Structs.sol with ModuleType enum

* 🚚 Update import statement in Storage.sol

* 🚚 Update module interface in AccountFactory

* Remove deprecated interfaces

* Add IStorage interface definition

* Update imports in Imports.sol

* ✨ Add Helpers.sol with utility functions

* Refactor code to improve performance and readability

* Refactor BicoTestBase and import Helpers and console2.sol

* Add Forge-std Test import and refactor newWallet function

* 🚨 Lint fix

* Delete unnecessary files

* 🔥 Remove unused function isInitialized()

* ⚡️ Refactor comment posting logic to delete existing Slither comments

* lint fix (Remove empty line in IModule.sol)

* 🐛 fix missing var on comment.js

* Add uniqueSlitherHeader to markdownComment

* Remove test workflow

* refactor

* proposed naming convention changes

* rename to supportsExecutionMode

* lint refactor

* refactor as per discussion / PR

* fix linter with unused import

* 🎨 lint

---------

Co-authored-by: aboudjem <[email protected]>
Co-authored-by: Filipp Makarov <[email protected]>
Co-authored-by: livingrockrises <[email protected]>

* Update version to 0.2.0 in CHANGELOG.md and package.json

---------

Co-authored-by: filmakarov <[email protected]>
Co-authored-by: Filipp Makarov <[email protected]>
Co-authored-by: livingrockrises <[email protected]>
Aboudjem added a commit that referenced this pull request Jun 4, 2024
* Release/0.1.0 (#10)

* 🎨 init repo

* 👷 update ci

* 🎨 update badges

* Feat/add husky (#4)

* Add husky for Git hooks

* 🚧 add branch naming check

* ✅Add Git hooks for branch name validation

* 💚 Update pre-push script to remove unnecessary line

* Add branch name validation checks for dev and main branches

* 🚧 Update branch naming check workflow

* 👷 Add PR Automation Workflow (#6)

* 🔖 Update package.json version to 0.1.0

* 💚 Fix versioning check in automation workflow

* ⚡️ Fix CI/CD workflows and update changelog

* 💚 Sync release branch to dev and create automated PR

* Update versioning check in automation workflow

* 💚 Update automation_workflow.yml to check for changes in package.json and CHANGELOG.md

* Refactor workflow to check for updated files

* Refactor code to improve performance and readability

* Add LICENSE file to GitHub Actions workflow

* 💚 Update automation workflow to check for changed files

* Update automation_workflow.yml to check for changes in package.json and CHANGELOG.md files

* Add checks for package.json, CHANGELOG.md, and LICENSE files

* Refactor verification logic in automation workflow

* Update automation_workflow.yml to verify changes in CHANGELOG.md file

* 💚 Add automation workflow for creating PRs to dev and main branches

* Update GitHub Actions versions

* 💚 Update automation_workflow.yml to use dynamic branch names

* Update GitHub token in automation_workflow.yml

* Refactor automation workflow to remove unnecessary steps

* Release/0.2.0 (#22)

* 🎨 init repo

* 👷 update ci

* 🎨 update badges

* Feat/add husky (#4)

* Add husky for Git hooks

* 🚧 add branch naming check

* ✅Add Git hooks for branch name validation

* 💚 Update pre-push script to remove unnecessary line

* Add branch name validation checks for dev and main branches

* 🚧 Update branch naming check workflow

* 👷 Add PR Automation Workflow (#6)

* Release/0.1.0 (#9)

* 🔖 Update package.json version to 0.1.0

* 💚 Fix versioning check in automation workflow

* ⚡️ Fix CI/CD workflows and update changelog

* 💚 Sync release branch to dev and create automated PR

* Update versioning check in automation workflow

* 💚 Update automation_workflow.yml to check for changes in package.json and CHANGELOG.md

* Refactor workflow to check for updated files

* Refactor code to improve performance and readability

* Add LICENSE file to GitHub Actions workflow

* 💚 Update automation workflow to check for changed files

* Update automation_workflow.yml to check for changes in package.json and CHANGELOG.md files

* Add checks for package.json, CHANGELOG.md, and LICENSE files

* Refactor verification logic in automation workflow

* Update automation_workflow.yml to verify changes in CHANGELOG.md file

* 💚 Add automation workflow for creating PRs to dev and main branches

* Update GitHub Actions versions

* 💚 Update automation_workflow.yml to use dynamic branch names

* Update GitHub token in automation_workflow.yml

* Refactor automation workflow to remove unnecessary steps

* Feat/erc 7579 interfaces (#12)

* 🙈 Add cache_forge to .gitignore

* Add .husky to .gitignore

* 🎨 Update tab width to 4 spaces in .prettierrc

* 🚧 Disable no-inline-assembly rule in .solhint.json

* ⚡️ Add account-abstraction dependency and update husky hooks

* 🔥 Remove Git hooks for branch name validation

* 🔧 Update tsconfig.json to disable strict mode

* 🎨 Update Solidity version and remappings, delete unused contracts and tests

* 🙈 Add .vscode/settings.json to .gitignore

* 🔥 Delete unused contracts and tests

* ✨ Add utility functions for conversion and formatting

* ✨ Add buildUserOp function to utils.ts

* ✨ Add git hook to check branch names

* ✨ Add SmartAccount contract

* ✨ Add AccountConfig contract implementation

* ✨ Add Execution contract for account execution

* ✨ Add ModuleConfig contract for managing modules

* ✨ Add Storage contract for isolated storage access

* ✨ Add Validator contract for user operation validation

* ⚡️ Add ERC-7579 interfaces for smart account configuration, execution, module, and module configuration

* ✨ Add IStorage interface for ERC20 account storage

* 🚀 Add deployment of SmartAccount contract

* 🚧 Update import statement and variable name in Deploy script

* ⚡️ Add Entrypoint 0.7.0

* ⚡️ Add Imports.sol for consolidated imports

* ✅ Add SmartAccount test file

* 👷 Remove unnecessary branch from PR Automation Workflow

* ✏️ Update storage location for SmartAccount in contracts

* Feat/slither (#14)

* 👷 Add Slither analysis workflow

* ♻️ Update Slither workflow to include Foundry installation***

* Add permissions and update Slither configuration

* Update Slither workflow to ensure tool availability

* Update Slither workflow

* Add Slither workflow to run static analysis

* 💚 add yarn.lock

* ✨ Update Slither workflow to include Node.js setup and SARIF report generation

* Remove SARIF file upload step in slither.yml

* Update Slither configuration in workflow

* 🚧 Update Slither workflow to include Foundry installation and contract building

* Remove target directory for analysis in slither.yml workflow

* 🚑 Update Slither workflow to include SARIF file upload

* Add token to SARIF file upload

* Add comment.js and update slither.yml workflow

* Update node version in slither.yml

* Update Slither workflow to fail on medium severity issues

* Add target directory for Slither analysis

* Update slither.yml with filter paths for mock contracts

* Update slither-args in slither.yml

* Fix slither-args path in GitHub workflow

* Update slither configuration to exclude node_modules directory

* Update slither-args in slither.yml workflow

* Update Slither version to 0.10.0

* Update slither.yml to fail on no severity issues

* Add check for pull request event in comment.js

* Update GitHub Actions workflow to trigger on pull requests (#15)

* Update GitHub Actions workflow to trigger on pull requests

* Update Slither workflow permissions and arguments

* Refactor CI workflow and remove redundant coverage and slither workflows

* Update Node.js and Foundry versions

* Add Foundry to PATH

* Update CI workflow to install lcov and make other improvements

* Add cache for Foundry Toolchain

* Update CI workflow configuration

* Refactor GitHub Actions workflow***

* Update CI workflow to cache node_modules and Foundry toolchain

* Update CI workflow and add linting, unit tests, coverage, and static analysis

* Update cache keys and add Foundry toolchain

* Add Foundry cache key generation and ensure Foundry directory exists

* Update CI workflow and cache actions***

* Update CI workflow and dependencies

* Update CI workflow to install Foundry and generate coverage report

* Add lcov installation step and update Codecov upload for Foundry and Hardhat coverage reports

* Refactor CI workflow and add Slither analysis

* Update CI Workflow to include linting, unit tests, coverage, and slither analysis

* Refactor CI workflow and update Slither analysis

* [WIP] Refactor and Start implementing methods (#17)

* 🙈 Add cache_forge to .gitignore

* Add .husky to .gitignore

* 🎨 Update tab width to 4 spaces in .prettierrc

* 🚧 Disable no-inline-assembly rule in .solhint.json

* ⚡️ Add account-abstraction dependency and update husky hooks

* 🔥 Remove Git hooks for branch name validation

* 🔧 Update tsconfig.json to disable strict mode

* 🎨 Update Solidity version and remappings, delete unused contracts and tests

* 🙈 Add .vscode/settings.json to .gitignore

* 🔥 Delete unused contracts and tests

* ✨ Add utility functions for conversion and formatting

* ✨ Add buildUserOp function to utils.ts

* ✨ Add git hook to check branch names

* ✨ Add SmartAccount contract

* ✨ Add AccountConfig contract implementation

* ✨ Add Execution contract for account execution

* ✨ Add ModuleConfig contract for managing modules

* ✨ Add Storage contract for isolated storage access

* ✨ Add Validator contract for user operation validation

* ⚡️ Add ERC-7579 interfaces for smart account configuration, execution, module, and module configuration

* ✨ Add IStorage interface for ERC20 account storage

* 🚀 Add deployment of SmartAccount contract

* 🚧 Update import statement and variable name in Deploy script

* ⚡️ Add Entrypoint 0.7.0

* ⚡️ Add Imports.sol for consolidated imports

* ✅ Add SmartAccount test file

* 👷 Remove unnecessary branch from PR Automation Workflow

* ✏️ Update storage location for SmartAccount in contracts

* Feat/slither (#14)

* 👷 Add Slither analysis workflow

* ♻️ Update Slither workflow to include Foundry installation***

* Add permissions and update Slither configuration

* Update Slither workflow to ensure tool availability

* Update Slither workflow

* Add Slither workflow to run static analysis

* 💚 add yarn.lock

* ✨ Update Slither workflow to include Node.js setup and SARIF report generation

* Remove SARIF file upload step in slither.yml

* Update Slither configuration in workflow

* 🚧 Update Slither workflow to include Foundry installation and contract building

* Remove target directory for analysis in slither.yml workflow

* 🚑 Update Slither workflow to include SARIF file upload

* Add token to SARIF file upload

* Add comment.js and update slither.yml workflow

* Update node version in slither.yml

* Update Slither workflow to fail on medium severity issues

* Add target directory for Slither analysis

* Update slither.yml with filter paths for mock contracts

* Update slither-args in slither.yml

* Fix slither-args path in GitHub workflow

* Update slither configuration to exclude node_modules directory

* Update slither-args in slither.yml workflow

* Update Slither version to 0.10.0

* Update slither.yml to fail on no severity issues

* Add check for pull request event in comment.js

* Update GitHub Actions workflow to trigger on pull requests (#15)

* Update GitHub Actions workflow to trigger on pull requests

* Update Slither workflow permissions and arguments

* Refactor CI workflow and remove redundant coverage and slither workflows

* Update Node.js and Foundry versions

* Add Foundry to PATH

* Update CI workflow to install lcov and make other improvements

* Add cache for Foundry Toolchain

* Update CI workflow configuration

* Refactor GitHub Actions workflow***

* Update CI workflow to cache node_modules and Foundry toolchain

* Update CI workflow and add linting, unit tests, coverage, and static analysis

* Update cache keys and add Foundry toolchain

* Add Foundry cache key generation and ensure Foundry directory exists

* Update CI workflow and cache actions***

* Update CI workflow and dependencies

* Update CI workflow to install Foundry and generate coverage report

* Add lcov installation step and update Codecov upload for Foundry and Hardhat coverage reports

* Refactor CI workflow and add Slither analysis

* Update CI Workflow to include linting, unit tests, coverage, and slither analysis

* lint comment.js module

* prettier on branch name check and add comments

* Refactor CI workflow and update Slither analysis

* Refactor comment.js and ci.yml to improve Slither analysis report generation

* Add Module contract implementation

* Fix returnData initialization bug in Execution.sol and import IModule in Module.sol

* Refactor getEmoji function to use text instead of impact level

* Update TYPE_ID constant to uint256

* Refactor comment.js to add URL shortening and emoji processing

* Update constant declaration in Module.sol

* Refactor comment.js to improve readability and add emojis

* Refactor comment.js to improve URL shortening and emoji handling

* refactor, change acc id

* 🎨 further refactor. add module types

* ⚙️ validateUserOp implementation

* ✅ add execute via EP test

* Add remappings and solady module

* 📦 Add new dependencies and update existing ones

* 🔨 Update package.json with new check-branch-name script

* Add 'deployments' to .gitignore

* Add hardhat-deploy package

* Refactor comment.js

* Refactor buildUserOp function and add new utility functions

* Add UserOperation and PackedUserOperation interfaces

* 📦 Update dependencies in yarn.lock

* Update husky hooks in package.json

* 🔥 Remove unused contract files

* 🐛 revert remappings in remappings.txt due to issue with hh

* Remove duplicated account-abstraction dep

* Update import paths for PackedUserOperation

* Remove unused contracts and imports

* ♻️ Update AccountConfig implementation ID

* 🙈 Add .solcover.js configuration file

* 🙈 add solcover

* 🔥 remove utils

* 🔥 remove account.test.ts

* 🎨 improve code with interface

* ✨ add encoding utils function

* ✨ add helpers for operation

* 🔥 remove unused module

* 🚀 utils for deployment

* ✨ add Counter test contract

* ✅ add mockvalidator for test purpose

* 🎨 simplify Execution funcs for quick test

* ✨ add onInstall hook on moduleManager

* 🔥 remove empty useless contract

* 🚀 add basic AccountFactory

* 🎨 add interface for AccountFactory

* ✅ add deployment tests

* ✅ add configuration tests

* ✅ add module management tests

* ✅ add acc execution tests

* 🚨 lint fix

* chore: forge init

* forge install: forge-std

v1.7.6

* chore: forge init

* Delete CounterTest contract and related tests

* Remove submodule lib/forge-std

* 🔧 Update remappings in remappings.txt

* 📦 Add ds-test dependency

* 📦 Add ds-test dependency

* ✨ Add computeAccountAddress function to AccountFactory

* Add test function to ignore coverage of ModuleTypeLib.sol

* Add test function to MockValidator to ignore coverage

* Remove forge-std subproject

* Update import path for Script.sol

* ✨ Add Structs.sol with ModuleType enum

* 🚚 Update import statement in Storage.sol

* 🚚 Update module interface in AccountFactory

* Remove deprecated interfaces

* Add IStorage interface definition

* Update imports in Imports.sol

* ✨ Add Helpers.sol with utility functions

* Refactor code to improve performance and readability

* Refactor BicoTestBase and import Helpers and console2.sol

* Add Forge-std Test import and refactor newWallet function

* 🚨 Lint fix

* Delete unnecessary files

* 🔥 Remove unused function isInitialized()

* ⚡️ Refactor comment posting logic to delete existing Slither comments

* lint fix (Remove empty line in IModule.sol)

* 🐛 fix missing var on comment.js

* Add uniqueSlitherHeader to markdownComment

* Remove test workflow

* refactor

* proposed naming convention changes

* rename to supportsExecutionMode

* lint refactor

* refactor as per discussion / PR

* fix linter with unused import

* 🎨 lint

---------

Co-authored-by: aboudjem <[email protected]>
Co-authored-by: Filipp Makarov <[email protected]>
Co-authored-by: livingrockrises <[email protected]>

* Update version to 0.2.0 in CHANGELOG.md and package.json

---------

Co-authored-by: filmakarov <[email protected]>
Co-authored-by: Filipp Makarov <[email protected]>
Co-authored-by: livingrockrises <[email protected]>

* update versions nexus to 1.0.0-beta

* lint fix

* fix conflicts

* remove Husky hooks and gas report generation + lint fix + clean + badge update

---------

Co-authored-by: filmakarov <[email protected]>
Co-authored-by: Filipp Makarov <[email protected]>
Co-authored-by: livingrockrises <[email protected]>
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.

3 participants