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: v0.4 #2

Merged
merged 5 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
workflow_dispatch:
push:
branches:
- "main"
pull_request:

jobs:
lint:
uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-lint.yaml@main"

build:
uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-build.yaml@main"

test:
needs: ["lint", "build"]
uses: "rhinestonewtf/reusable-workflows/.github/workflows/forge-test.yaml@main"
with:
foundry-fuzz-runs: 5000
foundry-profile: "test"
match-path: "test/**/*.sol"
34 changes: 0 additions & 34 deletions .github/workflows/test.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,3 @@ docs/
# Dotenv file
.env
node_modules

# Samples
/src/validators/SimpleValidator.sol
/src/executors/SimpleExecutor.sol
/src/hooks/SimpleHook.sol

/test/validators/SimpleValidator.t.sol
/test/executors/SimpleExecutor.t.sol
/test/hooks/SimpleHook.t.sol
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node-linker=hoisted
18 changes: 18 additions & 0 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "solhint:recommended",
"rules": {
"avoid-low-level-calls": "off",
"code-complexity": ["error", 9],
"compiler-version": ["error", ">=0.8.0"],
"contract-name-camelcase": "off",
"const-name-snakecase": "off",
"func-name-mixedcase": "off",
"func-visibility": ["error", { "ignoreConstructors": true }],
"max-line-length": ["error", 123],
"named-parameters-mapping": "warn",
"no-empty-blocks": "off",
"not-rely-on-time": "off",
"one-contract-per-file": "off",
"var-name-mixedcase": "off"
}
}
3 changes: 3 additions & 0 deletions .solhintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
test/
script/
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**A template for building smart account modules using the [ModuleKit](https://github.com/rhinestonewtf/modulekit)**

## Usage
## Using the template

### Install dependencies

Expand Down Expand Up @@ -55,3 +55,27 @@ source .env && forge verify-contract --chain-id [YOUR_CHAIN_ID] --watch --ethers
## Tutorials

For general explainers and guided walkthroughs of building a module, check out our [documentation](https://docs.rhinestone.wtf/modulekit).

## Using this repo

To install the dependencies, run:

```bash
pnpm install
```

To build the project, run:

```bash
forge build
```

To run the tests, run:

```bash
forge test
```

## Contributing

For feature or change requests, feel free to open a PR, start a discussion or get in touch with us.
7 changes: 4 additions & 3 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[profile.default]
emv_version = "paris"
src = "src"
out = "out"
libs = ["lib"]
#via_ir = true
script = "script"
libs = ["node_modules"]
fs_permissions = [{ access = "read", path = "out-optimized" }, { access = "read-write", path = "gas_calculations" }]
allow_paths = ["*", "/"]

[rpc_endpoints]
mainnet = "https://rpc.ankr.com/eth"
mainnet = "${MAINNET_RPC_URL}"

[fmt]
bracket_spacing = true
Expand Down
72 changes: 29 additions & 43 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,12 @@
{
"name": "@rhinestone/module-template",
"version": "0.4.0",
"description": "A Foundry template for building modules using the ModuleKit",
"license": "MIT",
"version": "0.3",
"license": "GPL-3.0",
"author": {
"name": "Rhinestone",
"url": "https://rhinestone.wtf"
},
"bugs": {
"url": "https://github.com/rhinestonewtf/module-template/issues"
},
"dependencies": {
"@prb/math": "^4.0.2",
"@rhinestone/modulekit": "^0.3.7",
"@safe-global/safe-contracts": "1.4.1-build.0",
"erc4337-validation": "github:rhinestonewtf/erc4337-validation"
},
"devDependencies": {
"@ERC4337/account-abstraction": "github:kopy-kat/account-abstraction#develop",
"@ERC4337/account-abstraction-v0.6": "github:eth-infinitism/account-abstraction#v0.6.0",
"@openzeppelin/contracts": "5.0.1",
"ds-test": "github:dapphub/ds-test",
"erc7579": "github:erc7579/erc7579-implementation",
"forge-std": "github:foundry-rs/forge-std",
"prettier": "^2.8.8",
"sentinellist": "github:rhinestonewtf/sentinellist",
"solady": "github:vectorized/solady",
"solarray": "github:sablier-labs/solarray",
"solhint": "^4.1.1",
"solmate": "github:transmissions11/solmate"
},
"files": [
"src",
"test",
"script"
],
"homepage": "https://github.com/rhinestonewtf/module-template/#readme",
"keywords": [
"blockchain",
"ethereum",
"foundry",
"smart-contracts",
"solidity",
"web3"
],
"publishConfig": {
"access": "public"
},
"repository": "github.com/rhinestonewtf/module-template",
"scripts": {
"build": "forge build",
"build:optimized": "FOUNDRY_PROFILE=optimized forge build",
Expand All @@ -64,5 +23,32 @@
"test": "forge test",
"test:lite": "FOUNDRY_PROFILE=lite forge test",
"test:optimized": "pnpm run build:optimized && FOUNDRY_PROFILE=test-optimized forge test"
},
"dependencies": {
"@rhinestone/modulekit": "^0.4.0"
},
"files": [
"src",
"test",
"script",
"package.json",
"foundry.toml",
"remappings.txt"
],
"homepage": "https://docs.rhinestone.wtf/module-template",
"repository": {
"type": "git",
"url": "git+https://github.com/rhinestonewtf/module-template.git"
},
"bugs": {
"url": "https://github.com/rhinestonewtf/module-template/issues"
},
"keywords": [
"account abstraction",
"smart account modules",
"module template"
],
"publishConfig": {
"access": "public"
}
}
Loading