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: Implement a Passkey SignatureValidator factory #306

Merged
merged 6 commits into from
Mar 7, 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_4337.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
Expand All @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
Expand All @@ -38,7 +38,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_4337_gas_metering.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_4337_upstream_bundler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
Expand Down
30 changes: 22 additions & 8 deletions .github/workflows/ci_passkey.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
cache-dependency-path: package-lock.json
- run: npm ci
- run: npm run coverage -w modules/passkey
- run: |
npm ci
npm run coverage -w modules/passkey
- uses: coverallsapp/github-action@master
with:
path-to-lcov: modules/passkey/coverage/lcov.info
Expand All @@ -24,12 +25,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
cache-dependency-path: package-lock.json
- run: npm ci
- run: npm run lint -w modules/passkey
- run: npm run fmt:check -w modules/passkey
- run: npm run build -w modules/passkey
- run: |
npm ci
npm run lint -w modules/passkey
npm run fmt:check -w modules/passkey
npm run build -w modules/passkey
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
cache-dependency-path: package-lock.json
- run: |
npm ci
npm run test:e2e -w modules/passkey
2 changes: 1 addition & 1 deletion .github/workflows/ci_passkey_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
Expand Down
4 changes: 2 additions & 2 deletions examples/4337-gas-metering/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/* Completeness */
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
"outDir": "./dist" /* Redirect output structure to the directory. */,
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
"noImplicitReturns": true /* Report error when not all code paths in function return a value. */
},
"exclude": ["node_modules"],
"exclude": ["node_modules"]
Copy link
Member Author

Choose a reason for hiding this comment

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

the formatter wanted me to do it

}
1 change: 0 additions & 1 deletion modules/4337/contracts/experimental/WebAuthnSigner.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ pragma solidity >=0.8.0;
import {SignatureValidatorConstants} from "./SignatureValidatorConstants.sol";
import {IUniqueSignerFactory} from "./SafeSignerLaunchpad.sol";
import {SignatureValidator} from "./SignatureValidator.sol";
import {SignatureValidatorConstants} from "./SignatureValidatorConstants.sol";
Copy link
Member Author

Choose a reason for hiding this comment

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

removed a duplicated import

import {IWebAuthnVerifier, WebAuthnConstants} from "./verifiers/WebAuthnVerifier.sol";

struct SignatureData {
Expand Down
2 changes: 0 additions & 2 deletions modules/4337/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ const userConfig: HardhatUserConfig = {
tags: ['dev', 'safe'],
},
hardhat: {
blockGasLimit: 100000000,
gas: 100000000,
gasPrice: 10000000000,
tags: ['test'],
},
Expand Down
10 changes: 6 additions & 4 deletions modules/4337/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
"build"
],
"scripts": {
"build": "hardhat compile",
"build": "npm run build:sol && npm run build:ts",
"build:ts": "npx rimraf dist && tsc",
"build:sol": "npx rimraf build && hardhat compile",
"test": "hardhat test --deploy-fixture",
"test:e2e": "./test/e2e/run.sh",
"test:e2e:upstream": "USE_UPSTREAM_BUNDLER=1 ./test/e2e/run.sh",
Expand All @@ -31,7 +32,8 @@
"fmt": "prettier --write ./contracts/**/*.sol",
"fmt:check": "prettier --check ./**/*.sol",
"prepack": "npm run build",
"prepublish": "npx rimraf build && npm run build && npm run build:ts"
"prepublish": "npm run build",
"postinstall": "npm run build"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -72,10 +74,10 @@
},
"overrides": {
"@safe-global/safe-contracts": {
"ethers": "^6.8.0"
"ethers": "^6.11.0"
}
},
"dependencies": {
"@safe-global/safe-contracts": "^1.4.1"
"@safe-global/safe-contracts": "^1.4.1-build.0"
nlordell marked this conversation as resolved.
Show resolved Hide resolved
}
}
2 changes: 2 additions & 0 deletions modules/passkey/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Entrypoint address to use for the Safe 4337 Signer Launchpad deployment. Defaults to the canonical entrypoint v0.7 address.
LAUNCHPAD_DEPLOYMENT_ENTRY_POINT_ADDRESS="0x0000000071727De22E5E9d8BAf0edAc6f37da032"
Loading
Loading