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

Feature/monorepo #74

Merged
merged 46 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
0288e17
feat: monorepo prototype
zeroknots Feb 16, 2024
d207ebb
chore: clean repo
zeroknots Feb 16, 2024
02b3ba8
feat: added example demo
zeroknots Feb 16, 2024
31681cd
chore: cleaning up
zeroknots Feb 16, 2024
e6ad7d9
del: removing ci files we dont need
zeroknots Feb 16, 2024
3901e3a
chore: updating libs
zeroknots Feb 16, 2024
1326e23
feat: ported over all module examples and tests
zeroknots Feb 19, 2024
e7f6cc0
fmt
zeroknots Feb 19, 2024
9d431ad
cleaned safe account
zeroknots Feb 20, 2024
fee71bc
factory done
zeroknots Feb 20, 2024
3c650b4
works
zeroknots Feb 20, 2024
54a9a79
fix gas calculations
zeroknots Feb 20, 2024
3ae5239
fixed tests
zeroknots Feb 20, 2024
dfb252d
feat: implemented safe hook
zeroknots Feb 20, 2024
f9dc756
wip
zeroknots Feb 20, 2024
c21951d
using new sentinellist 4337
zeroknots Feb 21, 2024
ad17830
Merge pull request #77 from rhinestonewtf/feature/modulekit-to-packages
zeroknots Feb 21, 2024
f24bb1c
chore: renaming s/account/safe/
zeroknots Feb 21, 2024
2cd64be
Update packages/SessionKeyManager/package.json
zeroknots Feb 21, 2024
1cac382
Update examples/package.json
zeroknots Feb 21, 2024
6008cf6
Update accounts/safe7579/package.json
zeroknots Feb 21, 2024
7669994
update deps
zeroknots Feb 21, 2024
0ae520a
clean up
zeroknots Feb 21, 2024
d7a2fe3
fix: init/deinit module via safe account
zeroknots Feb 21, 2024
f1456fc
chore: cleanup
zeroknots Feb 21, 2024
830dda3
feat: hook calls in function
zeroknots Feb 21, 2024
1f1a30a
chore: version update
zeroknots Feb 21, 2024
8d63189
chore: gas optimizations in ExecutionHelper
zeroknots Feb 21, 2024
41adb63
feat: fallback working
zeroknots Feb 21, 2024
8a1d74b
fix: cleaning imports
zeroknots Feb 21, 2024
627b11c
hook destruct working
zeroknots Feb 22, 2024
b8d0ab6
updating CI
zeroknots Feb 23, 2024
d291b05
fix: session key manager missing imports
kopy-kat Feb 23, 2024
100d124
feat: update to latest erc version
kopy-kat Feb 23, 2024
98e8d7b
chore: cleanup mocks
kopy-kat Feb 23, 2024
4a1da43
chore: update readme
kopy-kat Feb 23, 2024
727ede4
fix: validation failed constant
kopy-kat Feb 23, 2024
8cd5456
Merge branch 'main' into feature/monorepo
kopy-kat Feb 23, 2024
5788ccf
chore: update deps
kopy-kat Feb 23, 2024
6edd03c
feat: update to v0.7 entrypoint address
kopy-kat Feb 23, 2024
3062f39
feat: improve file naming and port module fixes
kopy-kat Feb 23, 2024
867fafc
feat: add module examples readme
kopy-kat Feb 23, 2024
14acd9c
chore: add changelog
kopy-kat Feb 23, 2024
b855e37
chore: update changelog
kopy-kat Feb 23, 2024
7d923fa
fix: linting issues
kopy-kat Feb 23, 2024
39290e2
fix: cicd
kopy-kat Feb 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/Safe7579_issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
name: Safe7579 Issue Template
about: Use this template to report a bug in the Safe7579 module
title: "[Safe7579]: [TITLE OF THE ISSUE]"
labels: safe7579, modulekit
---
50 changes: 50 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
on:
- push
- pull_request

jobs:
lint-modulekit:
uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-lint-workspaces.yaml@main"
with:
match-workspace: "@rhinestone/modulekit"

build-modulekit:
uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-test-workspaces.yaml@main"
with:
match-workspace: "@rhinestone/modulekit"

lint-safe7579:
needs: ["lint-modulekit"]
uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-lint-workspaces.yaml@main"
with:
match-workspace: "@rhinestone/safe7579"

test-safe7579:
needs: ["build-modulekit"]
uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-test-workspaces.yaml@main"
with:
match-workspace: "@rhinestone/safe7579"

lint-sessionkeymanager:
needs: ["lint-modulekit"]
uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-lint-workspaces.yaml@main"
with:
match-workspace: "@rhinestone/sessionkeymanager"

test-sessionkeymanager:
needs: ["build-modulekit"]
uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-test-workspaces.yaml@main"
with:
match-workspace: "@rhinestone/sessionkeymanager"

lint-modulekit-examples:
needs: ["lint-modulekit"]
uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-lint-workspaces.yaml@main"
with:
match-workspace: "@rhinestone/modulekit-examples"

test-modulekit-examples:
needs: ["build-modulekit"]
uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-test-workspaces.yaml@main"
with:
match-workspace: "@rhinestone/modulekit-examples"
34 changes: 0 additions & 34 deletions .github/workflows/test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ out/
/broadcast/*/31337/
/broadcast/**/dry-run/

gas_calculations/*.json
packages/modulekit/gas_calculations/*.json

# Docs
docs/
Expand Down
Empty file removed .gitmodules
Empty file.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,26 @@ All notable changes to this project will be documented in this file.

The format is based on [Common Changelog](https://common-changelog.org/).

[0.3.1]: https://github.com/rhinestonewtf/modulekit/releases/tag/v0.3.1
[0.3.0]: https://github.com/rhinestonewtf/modulekit/releases/tag/v0.3.0
[0.2.0]: https://github.com/rhinestonewtf/modulekit/releases/tag/v0.2.0
[0.1.0]: https://github.com/rhinestonewtf/modulekit/releases/tag/v0.1.0

## [0.3.1] - 23-02-2024

### Changed

- File structure:
- `packages` now includes the core components
- `examples` now includes the example modules
- `accounts` includes the account integrations (the ERC-7579 reference implementation is currently inside the `packages/modulekit` package)
- Support for the latest version of ERC-7579
- Entrypoint address is now the official v0.7 EntryPoint address

### Added

- Module Examples are now in the `examples` folder

## [0.3.0] - 01-02-2024

### Changed
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,26 @@ For feature or change requests, feel free to open a PR, start a discussion or ge

For guidance on how to create PRs, see the [CONTRIBUTING](./CONTRIBUTING.md) guide.

## Using this repo

To install dependencies, run:

```bash
pnpm install
```

To build the project, run:

```bash
pnpm build
```

To run tests, run:

```bash
pnpm test -r
```

## Credits

- [Safe{Core} Protocol](https://github.com/safe-global/safe-core-protocol/): ExecutorManager.sol is heavily insprired by Safe's SafeProtocolManager but is compatible across all supported accounts
Expand Down
2 changes: 2 additions & 0 deletions accounts/safe7579/.solhintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
test/
File renamed without changes.
File renamed without changes.
25 changes: 14 additions & 11 deletions src/accounts/safe/package.json → accounts/safe7579/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@rhinestone/safe-erc7579",
"name": "@rhinestone/safe7579",
"description": "Safe ERC7579 implementation",
"license": "MIT",
"version": "0.1.0",
Expand All @@ -8,23 +8,26 @@
"url": "https://rhinestone.wtf"
},
"bugs": {
"url": "https://github.com/rhinestonewtf/safe-erc7579/issues"
"url": "https://github.com/rhinestonewtf/modulekit/issues"
},
"devDependencies": {
"@openzeppelin/contracts": "5.0.1",
"@rhinestone/modulekit": "github:rhinestonewtf/modulekit",
"@rhinestone/modulekit": "workspace:*",
"@rhinestone/sessionkeymanager": "workspace:*",
"@safe-global/safe-contracts": "^1.4.1",
"@rhinestone/sessionkeymanager": "github:rhinestonewtf/sessionkeymanager",
"account-abstraction": "github:eth-infinitism/account-abstraction#develop",
"ds-test": "github:dapphub/ds-test",
"@openzeppelin/contracts": "5.0.1",
"@ERC4337/account-abstraction": "github:kopy-kat/account-abstraction#develop",
"@ERC4337/account-abstraction-v0.6": "github:eth-infinitism/account-abstraction#v0.6.0",
"erc4337-validation": "github:rhinestonewtf/erc4337-validation",
"@prb/math": "^4.0.2",
"forge-std": "github:foundry-rs/forge-std",
"ds-test": "github:dapphub/ds-test",
"erc7579": "github:erc7579/erc7579-implementation",
"prettier": "^2.8.8",
"sentinellist": "github:zeroknots/sentinellist",
"solady": "github:vectorized/solady",
"solarray": "github:sablier-labs/solarray",
"solmate": "github:transmissions11/solmate",
"solhint": "^4.1.1",
"solmate": "github:transmissions11/solmate"
"prettier": "^2.8.8"
},
"files": [
"artifacts",
Expand All @@ -33,7 +36,6 @@
"CHANGELOG.md",
"LICENSE-GPL.md"
],
"homepage": "https://github.com/rhinestonewtf/safe-erc7579/#readme",
"keywords": [
"blockchain",
"ethereum",
Expand All @@ -45,8 +47,9 @@
"publishConfig": {
"access": "public"
},
"repository": "github.com/rhinestonewtf/modulekit-examples",
"repository": "github.com/rhinestonewtf/modulekit",
"scripts": {
"fmt": "forge fmt",
"build": "forge build",
"build:optimized": "FOUNDRY_PROFILE=optimized forge build",
"build:smt": "FOUNDRY_PROFILE=smt forge build",
Expand Down
15 changes: 15 additions & 0 deletions accounts/safe7579/remappings.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ds-test/=node_modules/ds-test/src/
forge-std/=node_modules/forge-std/src/
account-abstraction/=node_modules/@ERC4337/account-abstraction/contracts/
account-abstraction-v0.6/=node_modules/@ERC4337/account-abstraction-v0.6/contracts/
erc7579/=node_modules/erc7579/src/
sentinellist/=node_modules/sentinellist/src/
solmate/=node_modules/solmate/src/
solady/=node_modules/solady/
solarray/=node_modules/solarray/src/
@rhinestone/=node_modules/@rhinestone/
@safe-global/=node_modules/@safe-global/
@ERC4337/=node_modules/@ERC4337/
@openzeppelin/=node_modules/@openzeppelin/
@prb/math/=node_modules/@prb/math/
erc4337-validation/=node_modules/erc4337-validation/src/
Loading
Loading