From 4dd14516c027ac9c16d2976059a023be5ab2bc4f Mon Sep 17 00:00:00 2001 From: Cove Marquis-Bortoli <44323490+CoveMB@users.noreply.github.com> Date: Wed, 19 Nov 2025 09:31:36 -0500 Subject: [PATCH 01/22] [Stellar] scafold fargate backend (#646) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Eric Lau Co-authored-by: collins-w Co-authored-by: https://x.com/rafaelKO76 Co-authored-by: Ruslan <56787163+typicalHuman@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ernesto García --- .changeset/brown-walls-roll.md | 7 + .changeset/huge-ties-find.md | 5 - .changeset/mean-shoes-cheer.md | 5 - .changeset/smart-fans-build.md | 7 - .changeset/twenty-hornets-clap.md | 5 - .early.coverage/v8/coverage-final.json | 1 + .github/actions/oidc/action.yaml | 45 + .github/workflows/docker-prod.yaml | 133 + .github/workflows/docker-stg.yaml | 126 + .gitignore | 5 + .prettierignore | 3 +- .vscode/example.settings.json | 10 +- .vscode/extensions.json | 5 +- CONTRIBUTING.md | 11 +- netlify.toml | 8 +- package.json | 1 + packages/common/CHANGELOG.md | 9 + packages/common/package.json | 2 +- .../common/src/ai/descriptions/solidity.ts | 5 +- .../common/src/ai/descriptions/stellar.ts | 1 + packages/core/solidity/CHANGELOG.md | 11 + packages/core/solidity/README.md | 74 +- packages/core/solidity/package.json | 2 +- packages/core/solidity/src/account.test.ts | 3 +- packages/core/solidity/src/account.test.ts.md | 5796 +++++++++++------ .../core/solidity/src/account.test.ts.snap | Bin 11607 -> 13330 bytes packages/core/solidity/src/account.ts | 16 +- packages/core/solidity/src/api.ts | 21 + .../core/solidity/src/generate/account.ts | 2 +- .../src/get-versioned-remappings.test.ts | 26 + .../src/get-versioned-remappings.test.ts.md | 31 + .../src/get-versioned-remappings.test.ts.snap | Bin 0 -> 302 bytes .../solidity/src/get-versioned-remappings.ts | 10 + packages/core/solidity/src/signer.ts | 58 +- packages/core/stellar/README.md | 4 +- packages/core/stellar/src/fungible.ts | 2 +- .../core/stellar/src/generate/non-fungible.ts | 1 + .../core/stellar/src/non-fungible.test.ts | 4 + .../core/stellar/src/non-fungible.test.ts.md | 61 +- .../stellar/src/non-fungible.test.ts.snap | Bin 1592 -> 1642 bytes packages/core/stellar/src/non-fungible.ts | 9 +- packages/core/stellar/src/zip-rust.ts | 3 + packages/mcp/CHANGELOG.md | 14 + packages/mcp/package.json | 6 +- packages/mcp/src/solidity/schemas.ts | 5 +- packages/mcp/src/stellar/schemas.ts | 1 + .../src/stellar/tools/non-fungible.test.ts | 2 + .../mcp/src/stellar/tools/non-fungible.ts | 15 +- packages/ui/.env.example | 4 + packages/ui/api/ai/.env.example | 2 + packages/ui/api/ai/Dockerfile.dev | 11 + .../cairo-alpha-shared.ts | 6 +- .../function-definitions/cairo-alpha.ts | 2 +- .../function-definitions/cairo-shared.ts | 7 +- .../function-definitions/cairo.ts | 2 +- .../function-definitions/polkadot.ts | 0 .../function-definitions/shared.ts | 2 +- .../function-definitions/solidity-shared.ts | 4 +- .../function-definitions/solidity.ts | 4 +- .../function-definitions/stellar-shared.ts | 4 +- .../function-definitions/stellar.ts | 6 +- .../function-definitions/stylus-shared.ts | 2 +- .../function-definitions/stylus.ts | 2 +- .../{ => ai}/ai-assistant/types/assistant.ts | 0 .../ai-assistant/types/function-definition.ts | 0 .../{ => ai}/ai-assistant/types/helpers.ts | 0 .../{ => ai}/ai-assistant/types/languages.ts | 24 +- packages/ui/{ => api/ai}/deno.json | 4 +- packages/ui/{ => api/ai}/deno.lock | 8 + .../deno => api/ai}/development-server.ts | 6 +- packages/ui/{ => api/ai}/import_map.json | 0 packages/ui/api/{ => ai/paths}/ai.ts | 26 +- .../api/{ => ai}/services/dev-mocks/redis.ts | 0 packages/ui/api/{ => ai}/services/open-ai.ts | 0 packages/ui/api/{ => ai}/services/redis.ts | 0 packages/ui/api/{ => ai}/utils/cors.ts | 0 packages/ui/api/{ => ai}/utils/env.ts | 0 .../ui/{scripts/deno => api/ai/utils}/log.ts | 0 packages/ui/api/docker-compose.yaml | 50 + packages/ui/api/stellar/.dockerignore | 6 + packages/ui/api/stellar/.env.example | 2 + packages/ui/api/stellar/Cargo.lock | 2384 +++++++ packages/ui/api/stellar/Cargo.toml | 26 + packages/ui/api/stellar/Dockerfile.dev | 42 + packages/ui/api/stellar/Dockerfile.prod | 62 + packages/ui/api/stellar/rustfmt.toml | 19 + packages/ui/api/stellar/src/config/mod.rs | 2 + packages/ui/api/stellar/src/config/server.rs | 38 + .../ui/api/stellar/src/controllers/mod.rs | 2 + .../src/controllers/upgrade_scaffold.rs | 36 + .../ui/api/stellar/src/environment/mod.rs | 4 + .../src/environment/scaffold_upgrade.rs | 25 + .../api/stellar/src/environment/zip_folder.rs | 281 + packages/ui/api/stellar/src/lib.rs | 17 + packages/ui/api/stellar/src/main.rs | 58 + packages/ui/api/stellar/src/routes/health.rs | 14 + packages/ui/api/stellar/src/routes/mod.rs | 9 + .../stellar/src/routes/upgrade_scaffold.rs | 30 + packages/ui/api/stellar/src/utils/dir.rs | 49 + packages/ui/api/stellar/src/utils/errors.rs | 20 + packages/ui/api/stellar/src/utils/glob.rs | 28 + packages/ui/api/stellar/src/utils/mod.rs | 8 + packages/ui/api/stellar/src/utils/path.rs | 99 + .../ui/api/stellar/tests/environment/mod.rs | 1 + .../stellar/tests/environment/zip_folder.rs | 333 + .../ui/api/stellar/tests/routes/health.rs | 15 + packages/ui/api/stellar/tests/routes/mod.rs | 1 + packages/ui/api/stellar/tests/tests_paths.rs | 8 + packages/ui/api/stellar/tests/utils/glob.rs | 70 + packages/ui/api/stellar/tests/utils/mod.rs | 1 + packages/ui/package.json | 5 +- packages/ui/public/index.html | 2 +- packages/ui/public/stellar.html | 20 +- packages/ui/rollup.config.mjs | 3 + packages/ui/src/cairo/App.svelte | 2 +- packages/ui/src/cairo_alpha/App.svelte | 2 +- packages/ui/src/common/Wiz.svelte | 3 +- .../ui/src/solidity/AccountControls.svelte | 7 + packages/ui/src/solidity/App.svelte | 2 +- packages/ui/src/stellar/App.svelte | 61 +- .../ui/src/stellar/NonFungibleControls.svelte | 8 + packages/ui/src/stylus/App.svelte | 2 +- 122 files changed, 8300 insertions(+), 2254 deletions(-) create mode 100644 .changeset/brown-walls-roll.md delete mode 100644 .changeset/huge-ties-find.md delete mode 100644 .changeset/mean-shoes-cheer.md delete mode 100644 .changeset/smart-fans-build.md delete mode 100644 .changeset/twenty-hornets-clap.md create mode 100644 .early.coverage/v8/coverage-final.json create mode 100644 .github/actions/oidc/action.yaml create mode 100644 .github/workflows/docker-prod.yaml create mode 100644 .github/workflows/docker-stg.yaml create mode 100644 packages/core/solidity/src/get-versioned-remappings.test.ts create mode 100644 packages/core/solidity/src/get-versioned-remappings.test.ts.md create mode 100644 packages/core/solidity/src/get-versioned-remappings.test.ts.snap create mode 100644 packages/core/solidity/src/get-versioned-remappings.ts create mode 100644 packages/ui/.env.example create mode 100644 packages/ui/api/ai/.env.example create mode 100644 packages/ui/api/ai/Dockerfile.dev rename packages/ui/api/{ => ai}/ai-assistant/function-definitions/cairo-alpha-shared.ts (94%) rename packages/ui/api/{ => ai}/ai-assistant/function-definitions/cairo-alpha.ts (99%) rename packages/ui/api/{ => ai}/ai-assistant/function-definitions/cairo-shared.ts (89%) rename packages/ui/api/{ => ai}/ai-assistant/function-definitions/cairo.ts (99%) rename packages/ui/api/{ => ai}/ai-assistant/function-definitions/polkadot.ts (100%) rename packages/ui/api/{ => ai}/ai-assistant/function-definitions/shared.ts (93%) rename packages/ui/api/{ => ai}/ai-assistant/function-definitions/solidity-shared.ts (84%) rename packages/ui/api/{ => ai}/ai-assistant/function-definitions/solidity.ts (98%) rename packages/ui/api/{ => ai}/ai-assistant/function-definitions/stellar-shared.ts (82%) rename packages/ui/api/{ => ai}/ai-assistant/function-definitions/stellar.ts (94%) rename packages/ui/api/{ => ai}/ai-assistant/function-definitions/stylus-shared.ts (92%) rename packages/ui/api/{ => ai}/ai-assistant/function-definitions/stylus.ts (96%) rename packages/ui/api/{ => ai}/ai-assistant/types/assistant.ts (100%) rename packages/ui/api/{ => ai}/ai-assistant/types/function-definition.ts (100%) rename packages/ui/api/{ => ai}/ai-assistant/types/helpers.ts (100%) rename packages/ui/api/{ => ai}/ai-assistant/types/languages.ts (85%) rename packages/ui/{ => api/ai}/deno.json (74%) rename packages/ui/{ => api/ai}/deno.lock (98%) rename packages/ui/{scripts/deno => api/ai}/development-server.ts (90%) rename packages/ui/{ => api/ai}/import_map.json (100%) rename packages/ui/api/{ => ai/paths}/ai.ts (71%) rename packages/ui/api/{ => ai}/services/dev-mocks/redis.ts (100%) rename packages/ui/api/{ => ai}/services/open-ai.ts (100%) rename packages/ui/api/{ => ai}/services/redis.ts (100%) rename packages/ui/api/{ => ai}/utils/cors.ts (100%) rename packages/ui/api/{ => ai}/utils/env.ts (100%) rename packages/ui/{scripts/deno => api/ai/utils}/log.ts (100%) create mode 100644 packages/ui/api/docker-compose.yaml create mode 100644 packages/ui/api/stellar/.dockerignore create mode 100644 packages/ui/api/stellar/.env.example create mode 100644 packages/ui/api/stellar/Cargo.lock create mode 100644 packages/ui/api/stellar/Cargo.toml create mode 100644 packages/ui/api/stellar/Dockerfile.dev create mode 100644 packages/ui/api/stellar/Dockerfile.prod create mode 100644 packages/ui/api/stellar/rustfmt.toml create mode 100644 packages/ui/api/stellar/src/config/mod.rs create mode 100644 packages/ui/api/stellar/src/config/server.rs create mode 100644 packages/ui/api/stellar/src/controllers/mod.rs create mode 100644 packages/ui/api/stellar/src/controllers/upgrade_scaffold.rs create mode 100644 packages/ui/api/stellar/src/environment/mod.rs create mode 100644 packages/ui/api/stellar/src/environment/scaffold_upgrade.rs create mode 100644 packages/ui/api/stellar/src/environment/zip_folder.rs create mode 100644 packages/ui/api/stellar/src/lib.rs create mode 100644 packages/ui/api/stellar/src/main.rs create mode 100644 packages/ui/api/stellar/src/routes/health.rs create mode 100644 packages/ui/api/stellar/src/routes/mod.rs create mode 100644 packages/ui/api/stellar/src/routes/upgrade_scaffold.rs create mode 100644 packages/ui/api/stellar/src/utils/dir.rs create mode 100644 packages/ui/api/stellar/src/utils/errors.rs create mode 100644 packages/ui/api/stellar/src/utils/glob.rs create mode 100644 packages/ui/api/stellar/src/utils/mod.rs create mode 100644 packages/ui/api/stellar/src/utils/path.rs create mode 100644 packages/ui/api/stellar/tests/environment/mod.rs create mode 100644 packages/ui/api/stellar/tests/environment/zip_folder.rs create mode 100644 packages/ui/api/stellar/tests/routes/health.rs create mode 100644 packages/ui/api/stellar/tests/routes/mod.rs create mode 100644 packages/ui/api/stellar/tests/tests_paths.rs create mode 100644 packages/ui/api/stellar/tests/utils/glob.rs create mode 100644 packages/ui/api/stellar/tests/utils/mod.rs diff --git a/.changeset/brown-walls-roll.md b/.changeset/brown-walls-roll.md new file mode 100644 index 000000000..c7652517d --- /dev/null +++ b/.changeset/brown-walls-roll.md @@ -0,0 +1,7 @@ +--- +'@openzeppelin/wizard-stellar': patch +'@openzeppelin/wizard-common': patch +'@openzeppelin/contracts-mcp': patch +--- + +Add tokenUri setting for stellar non fungible model diff --git a/.changeset/huge-ties-find.md b/.changeset/huge-ties-find.md deleted file mode 100644 index 5ffa27ba9..000000000 --- a/.changeset/huge-ties-find.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@openzeppelin/wizard': patch ---- - -Fixed bug with incorrect names in generated comment for Multisig account. diff --git a/.changeset/mean-shoes-cheer.md b/.changeset/mean-shoes-cheer.md deleted file mode 100644 index 6fa347a1d..000000000 --- a/.changeset/mean-shoes-cheer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@openzeppelin/wizard-common': patch ---- - -Add macros descriptions for Cairo diff --git a/.changeset/smart-fans-build.md b/.changeset/smart-fans-build.md deleted file mode 100644 index 7674a6434..000000000 --- a/.changeset/smart-fans-build.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@openzeppelin/wizard': patch -'@openzeppelin/wizard-common': minor -'@openzeppelin/contracts-mcp': patch ---- - -**Breaking changes**: Solidity Stablecoin and RWA: Change `custodian` option to `freezable`. Replace ERC20Custodian with ERC20Freezable. diff --git a/.changeset/twenty-hornets-clap.md b/.changeset/twenty-hornets-clap.md deleted file mode 100644 index e81554546..000000000 --- a/.changeset/twenty-hornets-clap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@openzeppelin/wizard': patch ---- - -Solidity account signer: Fix grammar in comment diff --git a/.early.coverage/v8/coverage-final.json b/.early.coverage/v8/coverage-final.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/.early.coverage/v8/coverage-final.json @@ -0,0 +1 @@ +{} diff --git a/.github/actions/oidc/action.yaml b/.github/actions/oidc/action.yaml new file mode 100644 index 000000000..221bf9c38 --- /dev/null +++ b/.github/actions/oidc/action.yaml @@ -0,0 +1,45 @@ +--- +name: AWS OIDC Credentials via Role Assume Chaining +description: Retrieve AWS credentials by chaining role assumes +inputs: + role-for-oidc: + description: The role that should be used for GitHub OIDC authentication + required: true + role-to-assume: + description: The role that should be finally assumed + required: true + role-session-name: + description: The session name that should be used when assuming roles + required: true + default: github-actions + role-duration-seconds: + description: duration of the credentials validity + required: true + default: "3600" + aws-region: + description: The AWS region + required: false + default: us-east-1 + +runs: + using: composite + steps: + - name: assume oidc role + uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 + with: + aws-region: ${{ inputs.aws-region }} + role-to-assume: ${{ inputs.role-for-oidc }} + role-session-name: ${{ inputs.role-session-name }} + role-duration-seconds: 900 + - name: assume target role + uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 + id: assume-target-role + with: + aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }} + aws-session-token: ${{ env.AWS_SESSION_TOKEN }} + aws-region: ${{ inputs.aws-region }} + role-chaining: true + role-to-assume: ${{ inputs.role-to-assume }} + role-session-name: ${{ inputs.role-session-name }} + role-duration-seconds: ${{ inputs.role-duration-seconds }} diff --git a/.github/workflows/docker-prod.yaml b/.github/workflows/docker-prod.yaml new file mode 100644 index 000000000..555f44248 --- /dev/null +++ b/.github/workflows/docker-prod.yaml @@ -0,0 +1,133 @@ +# This workflow runs whenever a release is created. +# The image is tagged with latest and the release version. +name: (Production) Build and Deploy + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + packages: write + attestations: write + security-events: write + env: + REGISTRY: ${{ secrets.RESEARCH_ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com + ROLE_FOR_OIDC: 'arn:aws:iam::${{ secrets.ROOT_ACCOUNT_ID }}:role/github-actions-research-account-oidc-role' + ROLE_TO_ASSUME: 'arn:aws:iam::${{ secrets.RESEARCH_ACCOUNT_ID }}:role/GithubOIDCResearchAccountRole' + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 + with: + egress-policy: audit + + - uses: actions/create-github-app-token@af35edadc00be37caa72ed9f3e6d5f7801bfdf09 # v1.11.7 + id: gh-app-token + with: + app-id: ${{ vars.GH_APP_ID }} + private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} + + - name: Checkout Repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + token: ${{ steps.gh-app-token.outputs.token }} + fetch-depth: 0 + + - name: Setup pre-requisites + uses: ./.github/actions/setup + with: + token: ${{ steps.gh-app-token.outputs.token }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 + with: + platforms: 'arm64' + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 + + - name: Set up AWS credentials via OIDC and role chaining + uses: ./.github/actions/oidc + with: + role-for-oidc: ${{ env.ROLE_FOR_OIDC }} + role-to-assume: ${{ env.ROLE_TO_ASSUME }} + + - name: Login to Amazon ECR + uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 + + - name: Build Stellar API Docker image + uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 + id: build + with: + context: . + platforms: linux/amd64 # linux/arm64 causes anchore/scan-action to fail + tags: | + ${{ env.REGISTRY }}/wizard-stellar-api-prod:latest + ${{ env.REGISTRY }}/wizard-stellar-api-prod:${{ github.sha }} + cache-from: type=gha + cache-to: type=gha,mode=max + load: true + + - name: Scan Stellar API Docker image + uses: anchore/scan-action@df395807f4554463d4455b8047cf58e37b6acaae # v6.5.0 + id: scan + with: + image: ${{ env.REGISTRY }}/wizard-stellar-api-prod:${{ github.sha }} + fail-build: false + + - name: Upload Anchore scan SARIF report + uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5 + with: + sarif_file: ${{ steps.scan.outputs.sarif }} + + - name: Build and push Stellar API Docker image + uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 + id: push + with: + context: packages/ui/api/stellar + file: Dockerfile.prod + platforms: linux/arm64 + push: true + tags: | + ${{ env.REGISTRY }}/wizard-api-prod:latest + ${{ env.REGISTRY }}/wizard-api-prod:${{ github.sha }} + cache-from: type=gha + cache-to: type=gha,mode=max + + deploy: + runs-on: ubuntu-latest + needs: build-and-push + env: + ROLE_FOR_OIDC: "${{ secrets.ROLE_FOR_OIDC }}" + ROLE_TO_ASSUME: "${{ secrets.ROLE_TO_ASSUME }}" + ECS_CLUSTER: ${{ vars.ECS_PRD_CLUSTER }} + ECS_SERVICE: ${{ vars.ECS_PRD_SERVICE }} + AWS_REGION: ${{ vars.AWS_REGION }} + permissions: + contents: read + id-token: write + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 + with: + egress-policy: audit + + - name: Checkout code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Set up AWS credentials via OIDC and role chaining + uses: ./.github/actions/oidc + with: + role-for-oidc: ${{ env.ROLE_FOR_OIDC }} + role-to-assume: ${{ env.ROLE_TO_ASSUME }} + + - name: AWS ECS force new deployment + run: | + aws ecs update-service --cluster $ECS_CLUSTER --service $ECS_SERVICE --force-new-deployment --region $AWS_REGION diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml new file mode 100644 index 000000000..2f9fc4a0e --- /dev/null +++ b/.github/workflows/docker-stg.yaml @@ -0,0 +1,126 @@ +# This workflow runs whenever a release is created. +# The image is tagged with latest and the release version. +name: (Staging) Build and Deploy + +on: + push: + branches: [main] + workflow_dispatch: + inputs: + branch: + description: 'Branch to build from' + required: true + default: 'main' + type: string + +permissions: + contents: read + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + packages: write + attestations: write + security-events: write + env: + REGISTRY: ${{ vars.DOCKER_REGISTRY }} + ROLE_FOR_OIDC: "${{ secrets.ROLE_FOR_OIDC }}" + ROLE_TO_ASSUME: "${{ secrets.ROLE_TO_ASSUME }}" + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 + with: + egress-policy: audit + + - name: Checkout code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 + with: + platforms: 'arm64' + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 + + - name: Set up AWS credentials via OIDC and role chaining + uses: ./.github/actions/oidc + with: + role-for-oidc: ${{ env.ROLE_FOR_OIDC }} + role-to-assume: ${{ env.ROLE_TO_ASSUME }} + + - name: Login to Amazon ECR + uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 + + - name: Build Stellar API Docker image + uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 + id: build + with: + context: ./packages/ui/api/stellar + platforms: linux/amd64 # linux/arm64 causes anchore/scan-action to fail + tags: | + ${{ env.REGISTRY }}/wizard-api-stg:latest + ${{ env.REGISTRY }}/wizard-api-stg:${{ github.sha }} + cache-from: type=gha + cache-to: type=gha,mode=max + load: true + + - name: Scan Stellar API Docker image + uses: anchore/scan-action@df395807f4554463d4455b8047cf58e37b6acaae # v6.5.0 + id: scan + with: + image: ${{ env.REGISTRY }}/wizard-stellar-api-stg:${{ github.sha }} + fail-build: false + + - name: Upload Anchore scan SARIF report + uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5 + with: + sarif_file: ${{ steps.scan.outputs.sarif }} + + - name: Build and push Stellar API Docker image + uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 + id: push + with: + context: packages/ui/api/stellar + file: Dockerfile.prod + platforms: linux/arm64 + push: true + tags: | + ${{ env.REGISTRY }}/wizard-stellar-api-stg:latest + ${{ env.REGISTRY }}/wizard-stellar-api-stg:${{ github.sha }} + cache-from: type=gha + cache-to: type=gha,mode=max + + deploy: + runs-on: ubuntu-latest + needs: build-and-push + env: + ROLE_FOR_OIDC: "${{ secrets.ROLE_FOR_OIDC }}" + ROLE_TO_ASSUME: "${{ secrets.ROLE_TO_ASSUME }}" + ECS_CLUSTER: ${{ vars.ECS_STG_CLUSTER }} + ECS_SERVICE: ${{ vars.ECS_STG_SERVICE }} + AWS_REGION: ${{ vars.REGION }} + permissions: + contents: read + id-token: write + steps: + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 + with: + egress-policy: audit + + - name: Checkout code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Set up AWS credentials via OIDC and role chaining + uses: ./.github/actions/oidc + with: + role-for-oidc: ${{ env.ROLE_FOR_OIDC }} + role-to-assume: ${{ env.ROLE_TO_ASSUME }} + + - name: AWS ECS force new deployment + run: | + aws ecs update-service --cluster $ECS_CLUSTER --service $ECS_SERVICE --force-new-deployment --region $AWS_REGION diff --git a/.gitignore b/.gitignore index baf29d25e..fb2be9502 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,8 @@ node_modules .env .env.local .vscode/settings.json + +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index d49d96ac6..5ef2de522 100644 --- a/.prettierignore +++ b/.prettierignore @@ -15,4 +15,5 @@ build/ public/ remappings.txt *.cairo -*.sh \ No newline at end of file +*.sh +*.rs \ No newline at end of file diff --git a/.vscode/example.settings.json b/.vscode/example.settings.json index 1adf5de86..21bf43bc6 100644 --- a/.vscode/example.settings.json +++ b/.vscode/example.settings.json @@ -4,5 +4,13 @@ "deno.enable": true, "deno.enablePaths": [ "packages/ui/scripts/deno/" - ] + ], + "[rust]": { + "editor.defaultFormatter": "rust-lang.rust-analyzer" + }, + "rust-analyzer.linkedProjects": [ + "packages/ui/stellar/Cargo.toml" + ], + "rust-analyzer.check.command": "clippy", + "rust-analyzer.checkOnSave": true } \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 14c228ba3..4edda7e30 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,6 +2,7 @@ "recommendations": [ "esbenp.prettier-vscode", "dbaeumer.vscode-eslint", - "denoland.vscode-deno" - ] + "denoland.vscode-deno", + "rust-lang.rust-analyzer" + ], } \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0d84bccc1..c5f797bb6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,6 +9,7 @@ Contributions to OpenZeppelin Contracts Wizard are welcome. Please review the in - `packages/core` contains the code generation logic for each language under separately named subfolders. - `packages/mcp` contains the MCP server. - `packages/ui` is the interface built in Svelte. +- `packages/ui/api` backend API for the UI. ## Building and testing the project @@ -16,10 +17,7 @@ Contributions to OpenZeppelin Contracts Wizard are welcome. Please review the in The following prerequisites are required to build the project locally: - [Node.js](https://nodejs.org/) - [Yarn](https://yarnpkg.com/getting-started/install) -- [Deno](https://github.com/denoland/deno?tab=readme-ov-file#installation) (Optional) to run a local API server for the AI Assistant - - Note that using the shell installation method is recommended (the `upgrade` command, which allows you to install a specific Deno version, is not always available when installing Deno with other installers). - - To install the version of Deno that matches the Netlify deploy environment, run `deno upgrade --version 1.46.3`. - - When adding dependencies for the Deno app add the dependency as a dev dependency using yarn, map the dependency to the Deno equivalent url in import_map.json and import it like a typescript dependency in the app. +- [Docker](https://www.docker.com/get-started/) (Optional) to run local API for the AI assistant and some language backend process ### Installing dependencies From the root directory: @@ -56,13 +54,14 @@ From the `packages/ui` directory: - Run `yarn dev` to start a local server for the UI. - Default port is 8080. To use another port, set the environment variable `PORT`, for example: `PORT=800 yarn dev` -### Running the AI Assistant (Optional) +### Running the UI backend (Optional) Create a `.env` file at the root directory, set the environment variable `OPENAI_API_KEY` using your OpenAI API key, and configure your OpenAI project limits to allow the `gpt-4o-mini` model or set the environment variable `OPENAI_MODEL` to a specific model. Then from the `packages/ui` directory: - In one terminal, start the UI according to the above section if the UI isn't already running. -- In another terminal, run `yarn dev:api` to start a local API server which handles AI Assistant functions. +- In another terminal, run `yarn dev:api` to start a local API server with Docker which handles AI Assistant functions. - Default port is 3000. To use another port, set the environment variable `API_PORT` + - Run `dev:api:build` to rebuild the Docker container > [!TIP] > You can also start both the UI and API servers simultaneously by running `yarn dev` from the root directory. diff --git a/netlify.toml b/netlify.toml index aba54c949..9b029ac67 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,11 +2,11 @@ command = "yarn --cwd packages/ui build" publish = "packages/ui/public" -edge_functions = "packages/ui/api" +edge_functions = "packages/ui/api/ai/paths" [functions] - deno_import_map = "packages/ui/import_map.json" +deno_import_map = "packages/ui/api/ai/import_map.json" [[edge_functions]] - path = "/ai" - function = "ai" \ No newline at end of file +path = "/ai" +function = "ai" diff --git a/package.json b/package.json index 355458cac..d59c14911 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "type:check:api": "yarn --cwd ./packages/ui type:check:api", "dev:ui": "yarn --cwd ./packages/ui dev", "dev:api": "yarn --cwd ./packages/ui dev:api", + "dev:api:build": "yarn --cwd ./packages/ui dev:api:build", "dev": "concurrently --kill-others-on-fail --names \"UI,API\" --prefix-colors \"magenta.bold,green.bold\" \"yarn dev:ui\" \"yarn dev:api\"", "run:core": "node ./scripts/run-command.mjs", "version": "bash scripts/release/version.sh", diff --git a/packages/common/CHANGELOG.md b/packages/common/CHANGELOG.md index 44d72c136..64a60f41f 100644 --- a/packages/common/CHANGELOG.md +++ b/packages/common/CHANGELOG.md @@ -1,6 +1,15 @@ # Changelog +## 0.3.1 (2025-11-12) + +- Solidity account signer: Add `WebAuthn` to the list of signers available. ([#718](https://github.com/OpenZeppelin/contracts-wizard/pull/718)) + +## 0.3.0 (2025-11-11) + +- **Breaking changes**: Solidity Stablecoin and RWA: Change `custodian` option to `freezable`. Replace ERC20Custodian with ERC20Freezable. ([#719](https://github.com/OpenZeppelin/contracts-wizard/pull/719)) +- Add macros descriptions for Cairo ([#703](https://github.com/OpenZeppelin/contracts-wizard/pull/703)) + ## 0.2.0 (2025-11-03) - **Breaking changes**: Solidity Stablecoin and RWA: Change `limitations` option to `restrictions`. Replace ERC20Allowlist and ERC20Blocklist with ERC20Restricted. ([#715](https://github.com/OpenZeppelin/contracts-wizard/pull/715)) diff --git a/packages/common/package.json b/packages/common/package.json index 87f03eb51..42ad9c0a5 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@openzeppelin/wizard-common", - "version": "0.2.0", + "version": "0.3.1", "description": "Common library for OpenZeppelin Contracts Wizard components. Used internally.", "license": "AGPL-3.0-only", "repository": "https://github.com/OpenZeppelin/contracts-wizard", diff --git a/packages/common/src/ai/descriptions/solidity.ts b/packages/common/src/ai/descriptions/solidity.ts index 02028d87b..ab9b5c5ae 100644 --- a/packages/common/src/ai/descriptions/solidity.ts +++ b/packages/common/src/ai/descriptions/solidity.ts @@ -69,10 +69,11 @@ export const solidityAccountDescriptions = { signer: `Defines the signature verification algorithm used by the account to verify user operations. Options: - ECDSA: Standard Ethereum signature validation using secp256k1, validates signatures against a specified owner address - EIP7702: Special ECDSA validation using account's own address as signer, enables EOAs to delegate execution rights + - Multisig: ERC-7913 multisignature requiring minimum number of signatures from authorized signers + - MultisigWeighted: ERC-7913 weighted multisignature where signers have different voting weights - P256: NIST P-256 curve (secp256r1) validation for integration with Passkeys and HSMs - RSA: RSA PKCS#1 v1.5 signature validation (RFC8017) for PKI systems and HSMs - - Multisig: ERC-7913 multisignature requiring minimum number of signatures from authorized signers - - MultisigWeighted: ERC-7913 weighted multisignature where signers have different voting weights`, + - WebAuthn: Web Authentication (WebAuthn) assertion validation for integration with Passkeys and HSMs on top of P256`, batchedExecution: 'Whether to implement a minimal batching interface for the account to allow multiple operations to be executed in a single transaction following the ERC-7821 standard.', ERC7579Modules: diff --git a/packages/common/src/ai/descriptions/stellar.ts b/packages/common/src/ai/descriptions/stellar.ts index 18532c024..752475567 100644 --- a/packages/common/src/ai/descriptions/stellar.ts +++ b/packages/common/src/ai/descriptions/stellar.ts @@ -22,6 +22,7 @@ export const stellarNonFungibleDescriptions = { enumerable: 'Whether the NFTs are enumerable (can be iterated over).', consecutive: 'To batch mint NFTs instead of minting them individually (sequential minting is mandatory).', sequential: 'Whether the IDs of the minted NFTs will be sequential.', + tokenUri: 'The metadata URI returned by the token contract for every NFT.', }; export const stellarStablecoinDescriptions = { diff --git a/packages/core/solidity/CHANGELOG.md b/packages/core/solidity/CHANGELOG.md index 9c345609c..326816211 100644 --- a/packages/core/solidity/CHANGELOG.md +++ b/packages/core/solidity/CHANGELOG.md @@ -1,6 +1,17 @@ # Changelog +## 0.10.2 (2025-11-12) + +- Solidity account signer: Add `WebAuthn` to the list of signers available. ([#718](https://github.com/OpenZeppelin/contracts-wizard/pull/718)) + +## 0.10.1 (2025-11-11) + +- Fixed bug with incorrect names in generated comment for Multisig account. ([#720](https://github.com/OpenZeppelin/contracts-wizard/pull/720)) +- Add API function to get versioned remappings. ([#724](https://github.com/OpenZeppelin/contracts-wizard/pull/724)) +- **Breaking changes**: Solidity Stablecoin and RWA: Change `custodian` option to `freezable`. Replace ERC20Custodian with ERC20Freezable. ([#719](https://github.com/OpenZeppelin/contracts-wizard/pull/719)) +- Solidity account signer: Fix grammar in comment ([#711](https://github.com/OpenZeppelin/contracts-wizard/pull/711)) + ## 0.10.0 (2025-11-03) - Update `@openzeppelin/contracts` and `@openzeppelin/contracts-upgradeable` dependencies to 5.5.0 ([#681](https://github.com/OpenZeppelin/contracts-wizard/pull/681)) diff --git a/packages/core/solidity/README.md b/packages/core/solidity/README.md index d8a3401ff..3277577ad 100644 --- a/packages/core/solidity/README.md +++ b/packages/core/solidity/README.md @@ -24,81 +24,42 @@ The following contract types are supported: Note that `stablecoin` and `realWorldAsset` are experimental and may be subject to change. -Each contract type has functions/constants as defined below. - ### Functions +Each contract type implements a common API with methods that take contract-specific options (e.g., `ERC20Options` for `erc20`, `ERC721Options` for `erc721`, etc.). This ensures type safety and allows for contract-specific features. + #### `print` ```js -function print(opts?: ERC20Options): string -``` -```js -function print(opts?: ERC721Options): string -``` -```js -function print(opts?: ERC1155Options): string -``` -```js -function print(opts?: StablecoinOptions): string -``` -```js -function print(opts?: AccountOptions): string -``` -```js -function print(opts?: GovernorOptions): string -``` -```js -function print(opts?: CustomOptions): string +function print(opts?: Options): string ``` Returns a string representation of a contract generated using the provided options. If `opts` is not provided, uses [`defaults`](#defaults). -#### `defaults` -```js -const defaults: Required -``` -```js -const defaults: Required -``` -```js -const defaults: Required -``` -```js -const defaults: Required -``` +#### `getVersionedRemappings` ```js -const defaults: Required +function getVersionedRemappings(opts?: Options): string[] ``` +Returns an array of remappings that map unversioned import prefixes to versioned import prefixes. For example: ```js -const defaults: Required +[ + "@openzeppelin/contracts/=@openzeppelin/contracts@5.5.0/", + "@openzeppelin/contracts-upgradeable/=@openzeppelin/contracts-upgradeable@5.5.0/" +] ``` +If the contract options include upgradeability, the upgradeable remapping is included. If `opts` is not provided, uses [`defaults`](#defaults). + +#### `defaults` ```js -const defaults: Required +const defaults: Required ``` -The default options that are used for [`print`](#print). +The default options that are used for [`print`](#print) and [`getVersionedRemappings`](#getVersionedRemappings). #### `isAccessControlRequired` ```js -function isAccessControlRequired(opts: Partial): boolean -``` -```js -function isAccessControlRequired(opts: Partial): boolean -``` -```js -function isAccessControlRequired(opts: Partial): boolean -``` -```js -function isAccessControlRequired(opts: Partial): boolean -``` -```js -function isAccessControlRequired(opts: Partial): boolean -``` -```js -function isAccessControlRequired(opts: Partial): boolean +function isAccessControlRequired(opts: Partial): boolean ``` Whether any of the provided options require access control to be enabled. If this returns `true`, then calling `print` with the same options would cause the `access` option to default to `'ownable'` if it was `undefined` or `false`. -> Note that contracts such as `account`, have its own way of handling permissions and do not support the `access` option. -Thus, that type does not include `isAccessControlRequired`. +> Note that contracts such as `account` have their own way of handling permissions and do not support the `access` option. Thus, that type does not include `isAccessControlRequired`. ### Examples @@ -129,4 +90,3 @@ const contract = erc20.print({ ...erc20.defaults, upgradeable: 'uups', }); -``` diff --git a/packages/core/solidity/package.json b/packages/core/solidity/package.json index 92b7bdc7d..e53898a86 100644 --- a/packages/core/solidity/package.json +++ b/packages/core/solidity/package.json @@ -1,6 +1,6 @@ { "name": "@openzeppelin/wizard", - "version": "0.10.0", + "version": "0.10.2", "description": "A boilerplate generator to get started with OpenZeppelin Contracts", "license": "AGPL-3.0-only", "repository": "https://github.com/OpenZeppelin/contracts-wizard", diff --git a/packages/core/solidity/src/account.test.ts b/packages/core/solidity/src/account.test.ts index 6e1d66de8..2cc356480 100644 --- a/packages/core/solidity/src/account.test.ts +++ b/packages/core/solidity/src/account.test.ts @@ -4,6 +4,7 @@ import { account } from '.'; import type { AccountOptions } from './account'; import { buildAccount } from './account'; import { printContract } from './print'; +import { SignerOptions } from './signer'; /** * Tests external API for equivalence with internal API @@ -61,7 +62,7 @@ function format(upgradeable: false | 'uups' | 'transparent') { } } -for (const signer of [false, 'ECDSA', 'EIP7702', 'P256', 'RSA', 'Multisig', 'MultisigWeighted'] as const) { +for (const signer of SignerOptions) { for (const upgradeable of [false, 'uups', 'transparent'] as const) { if (signer === 'EIP7702' && !!upgradeable) continue; diff --git a/packages/core/solidity/src/account.test.ts.md b/packages/core/solidity/src/account.test.ts.md index 8b1d08595..3c33b3548 100644 --- a/packages/core/solidity/src/account.test.ts.md +++ b/packages/core/solidity/src/account.test.ts.md @@ -3135,7 +3135,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 named non-upgradeable +## Account with SignerMultisig named non-upgradeable > Snapshot 1 @@ -3146,17 +3146,29 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ ␊ - contract CustomAccountWithSignerP256 is Account, EIP712, ERC7739, SignerP256 {␊ - constructor(bytes32 qx, bytes32 qy)␊ - EIP712("CustomAccount with SignerP256", "1")␊ - SignerP256(qx, qy)␊ + contract CustomAccountWithSignerMultisig is Account, EIP712, ERC7739, MultiSignerERC7913 {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisig", "1")␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerP256 with ERC1271 non-upgradeable +## Account with SignerMultisig with ERC1271 non-upgradeable > Snapshot 1 @@ -3166,10 +3178,12 @@ Generated by [AVA](https://avajs.dev). ␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC1271 is Account, IERC1271, SignerP256 {␊ - constructor(bytes32 qx, bytes32 qy) SignerP256(qx, qy) {}␊ + contract CustomAccountWithSignerMultisigERC1271 is Account, IERC1271, MultiSignerERC7913 {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ + MultiSignerERC7913(signers, threshold)␊ + {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ public␊ @@ -3179,10 +3193,22 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerP256 with ERC7739 non-upgradeable +## Account with SignerMultisig with ERC7739 non-upgradeable > Snapshot 1 @@ -3193,17 +3219,29 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC7739 is Account, EIP712, ERC7739, SignerP256 {␊ - constructor(bytes32 qx, bytes32 qy)␊ - EIP712("CustomAccount with SignerP256ERC7739", "1")␊ - SignerP256(qx, qy)␊ + contract CustomAccountWithSignerMultisigERC7739 is Account, EIP712, ERC7739, MultiSignerERC7913 {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigERC7739", "1")␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerP256 with ERC721Holder non-upgradeable +## Account with SignerMultisig with ERC721Holder non-upgradeable > Snapshot 1 @@ -3215,17 +3253,29 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC721Holder is Account, EIP712, ERC7739, SignerP256, ERC721Holder {␊ - constructor(bytes32 qx, bytes32 qy)␊ - EIP712("CustomAccount with SignerP256ERC721Holder", "1")␊ - SignerP256(qx, qy)␊ + contract CustomAccountWithSignerMultisigERC721Holder is Account, EIP712, ERC7739, MultiSignerERC7913, ERC721Holder {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigERC721Holder", "1")␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerP256 with ERC1155Holder non-upgradeable +## Account with SignerMultisig with ERC1155Holder non-upgradeable > Snapshot 1 @@ -3237,17 +3287,29 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC1155Holder is Account, EIP712, ERC7739, SignerP256, ERC1155Holder {␊ - constructor(bytes32 qx, bytes32 qy)␊ - EIP712("CustomAccount with SignerP256ERC1155Holder", "1")␊ - SignerP256(qx, qy)␊ + contract CustomAccountWithSignerMultisigERC1155Holder is Account, EIP712, ERC7739, MultiSignerERC7913, ERC1155Holder {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigERC1155Holder", "1")␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerP256 with ERC721Holder and ERC1155Holder non-upgradeable +## Account with SignerMultisig with ERC721Holder and ERC1155Holder non-upgradeable > Snapshot 1 @@ -3260,17 +3322,29 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC721HolderERC1155Holder is Account, EIP712, ERC7739, SignerP256, ERC721Holder, ERC1155Holder {␊ - constructor(bytes32 qx, bytes32 qy)␊ - EIP712("CustomAccount with SignerP256ERC721HolderERC1155Holder", "1")␊ - SignerP256(qx, qy)␊ + contract CustomAccountWithSignerMultisigERC721HolderERC1155Holder is Account, EIP712, ERC7739, MultiSignerERC7913, ERC721Holder, ERC1155Holder {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigERC721HolderERC1155Holder", "1")␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerP256 with ERC7821 Execution non-upgradeable +## Account with SignerMultisig with ERC7821 Execution non-upgradeable > Snapshot 1 @@ -3282,13 +3356,25 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, SignerP256, ERC7821 {␊ - constructor(bytes32 qx, bytes32 qy)␊ + contract MyAccount is Account, EIP712, ERC7739, MultiSignerERC7913, ERC7821 {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ EIP712("MyAccount", "1")␊ - SignerP256(qx, qy)␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ internal␊ @@ -3301,7 +3387,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 non-upgradeable +## Account with SignerMultisig with ERC7579 non-upgradeable > Snapshot 1 @@ -3314,13 +3400,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerP256 {␊ - constructor(bytes32 qx, bytes32 qy)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913 {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ EIP712("MyAccount", "1")␊ - SignerP256(qx, qy)␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -3334,6 +3420,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -3345,14 +3443,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256 is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ + // IMPORTANT: Make sure MultiSignerERC7913 is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256, AbstractSigner, AccountERC7579)␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -3360,7 +3458,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 with ERC1271 non-upgradeable +## Account with SignerMultisig with ERC7579 with ERC1271 non-upgradeable > Snapshot 1 @@ -3372,11 +3470,25 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, IERC1271, AccountERC7579, SignerP256 {␊ - constructor(bytes32 qx, bytes32 qy) SignerP256(qx, qy) {}␊ + contract MyAccount is Account, IERC1271, AccountERC7579, MultiSignerERC7913 {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ + MultiSignerERC7913(signers, threshold)␊ + {}␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -3397,14 +3509,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256 is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ + // IMPORTANT: Make sure MultiSignerERC7913 is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256, AbstractSigner, AccountERC7579)␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -3412,7 +3524,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 with ERC7739 non-upgradeable +## Account with SignerMultisig with ERC7579 with ERC7739 non-upgradeable > Snapshot 1 @@ -3425,13 +3537,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerP256 {␊ - constructor(bytes32 qx, bytes32 qy)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913 {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ EIP712("MyAccount", "1")␊ - SignerP256(qx, qy)␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -3445,6 +3557,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -3456,14 +3580,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256 is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ + // IMPORTANT: Make sure MultiSignerERC7913 is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256, AbstractSigner, AccountERC7579)␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -3471,7 +3595,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 hooks non-upgradeable +## Account with SignerMultisig with ERC7579 hooks non-upgradeable > Snapshot 1 @@ -3485,13 +3609,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Hooked} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579Hooked.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, SignerP256 {␊ - constructor(bytes32 qx, bytes32 qy)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, MultiSignerERC7913 {␊ + constructor(bytes[] memory signers, uint64 threshold)␊ EIP712("MyAccount", "1")␊ - SignerP256(qx, qy)␊ + MultiSignerERC7913(signers, threshold)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -3505,6 +3629,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -3516,14 +3652,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256 is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ + // IMPORTANT: Make sure MultiSignerERC7913 is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256, AbstractSigner, AccountERC7579)␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -3531,7 +3667,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 named upgradeable uups +## Account with SignerMultisig named upgradeable uups > Snapshot 1 @@ -3543,17 +3679,32 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisig is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerP256", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisig", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -3564,7 +3715,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC1271 upgradeable uups +## Account with SignerMultisig with ERC1271 upgradeable uups > Snapshot 1 @@ -3575,17 +3726,20 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC1271 is Initializable, Account, IERC1271, SignerP256Upgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -3596,6 +3750,18 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -3605,7 +3771,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7739 upgradeable uups +## Account with SignerMultisig with ERC7739 upgradeable uups > Snapshot 1 @@ -3617,17 +3783,32 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC7739 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerP256ERC7739", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisigERC7739", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -3638,7 +3819,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC721Holder upgradeable uups +## Account with SignerMultisig with ERC721Holder upgradeable uups > Snapshot 1 @@ -3651,17 +3832,32 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC721Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC721Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC721Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerP256ERC721Holder", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisigERC721Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -3672,7 +3868,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC1155Holder upgradeable uups +## Account with SignerMultisig with ERC1155Holder upgradeable uups > Snapshot 1 @@ -3685,17 +3881,32 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC1155Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC1155Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerP256ERC1155Holder", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisigERC1155Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -3706,7 +3917,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC721Holder and ERC1155Holder upgradeable uups +## Account with SignerMultisig with ERC721Holder and ERC1155Holder upgradeable uups > Snapshot 1 @@ -3720,19 +3931,34 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor()␊ - EIP712("CustomAccount with SignerP256ERC721HolderERC1155Holder", "1")␊ + EIP712("CustomAccount with SignerMultisigERC721HolderERC1155Holder", "1")␊ {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -3743,7 +3969,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7821 Execution upgradeable uups +## Account with SignerMultisig with ERC7821 Execution upgradeable uups > Snapshot 1 @@ -3756,17 +3982,32 @@ Generated by [AVA](https://avajs.dev). import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC7821, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC7821, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ @@ -3786,7 +4027,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 upgradeable uups +## Account with SignerMultisig with ERC7579 upgradeable uups > Snapshot 1 @@ -3800,19 +4041,22 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerP256_init(qx, qy);␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -3826,6 +4070,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -3843,14 +4099,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -3858,7 +4114,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 with ERC1271 upgradeable uups +## Account with SignerMultisig with ERC7579 with ERC1271 upgradeable uups > Snapshot 1 @@ -3871,28 +4127,43 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerP256Upgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerP256_init(qx, qy);␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ - function _authorizeUpgrade(address newImplementation)␊ - internal␊ - override␊ - onlyEntryPointOrSelf␊ - {}␊ - ␊ - // The following functions are overrides required by Solidity.␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ ␊ function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ internal␊ @@ -3911,14 +4182,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -3926,7 +4197,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 with ERC7739 upgradeable uups +## Account with SignerMultisig with ERC7579 with ERC7739 upgradeable uups > Snapshot 1 @@ -3940,19 +4211,22 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerP256_init(qx, qy);␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -3966,6 +4240,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -3983,14 +4269,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -3998,7 +4284,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 hooks upgradeable uups +## Account with SignerMultisig with ERC7579 hooks upgradeable uups > Snapshot 1 @@ -4013,19 +4299,22 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerP256Upgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579Hooked_init();␊ - __SignerP256_init(qx, qy);␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4039,6 +4328,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -4056,14 +4357,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4071,7 +4372,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 named upgradeable transparent +## Account with SignerMultisig named upgradeable transparent > Snapshot 1 @@ -4083,21 +4384,36 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable {␊ + contract CustomAccountWithSignerMultisig is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerP256", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisig", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerP256 with ERC1271 upgradeable transparent +## Account with SignerMultisig with ERC1271 upgradeable transparent > Snapshot 1 @@ -4108,16 +4424,19 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC1271 is Initializable, Account, IERC1271, SignerP256Upgradeable {␊ + contract CustomAccountWithSignerMultisigERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4128,10 +4447,22 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerP256 with ERC7739 upgradeable transparent +## Account with SignerMultisig with ERC7739 upgradeable transparent > Snapshot 1 @@ -4143,21 +4474,36 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC7739 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable {␊ + contract CustomAccountWithSignerMultisigERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerP256ERC7739", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisigERC7739", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerP256 with ERC721Holder upgradeable transparent +## Account with SignerMultisig with ERC721Holder upgradeable transparent > Snapshot 1 @@ -4170,21 +4516,36 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC721Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC721Holder {␊ + contract CustomAccountWithSignerMultisigERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC721Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerP256ERC721Holder", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisigERC721Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerP256 with ERC1155Holder upgradeable transparent +## Account with SignerMultisig with ERC1155Holder upgradeable transparent > Snapshot 1 @@ -4197,21 +4558,36 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC1155Holder {␊ + contract CustomAccountWithSignerMultisigERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC1155Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerP256ERC1155Holder", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisigERC1155Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerP256 with ERC721Holder and ERC1155Holder upgradeable transparent +## Account with SignerMultisig with ERC721Holder and ERC1155Holder upgradeable transparent > Snapshot 1 @@ -4225,23 +4601,38 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerP256ERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC721Holder, ERC1155Holder {␊ + contract CustomAccountWithSignerMultisigERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC721Holder, ERC1155Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor()␊ - EIP712("CustomAccount with SignerP256ERC721HolderERC1155Holder", "1")␊ + EIP712("CustomAccount with SignerMultisigERC721HolderERC1155Holder", "1")␊ {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerP256 with ERC7821 Execution upgradeable transparent +## Account with SignerMultisig with ERC7821 Execution upgradeable transparent > Snapshot 1 @@ -4254,17 +4645,32 @@ Generated by [AVA](https://avajs.dev). import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC7821 {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC7821 {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ - __SignerP256_init(qx, qy);␊ - }␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ internal␊ @@ -4277,7 +4683,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 upgradeable transparent +## Account with SignerMultisig with ERC7579 upgradeable transparent > Snapshot 1 @@ -4291,18 +4697,21 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerP256_init(qx, qy);␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4316,6 +4725,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -4327,14 +4748,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4342,7 +4763,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 with ERC1271 upgradeable transparent +## Account with SignerMultisig with ERC7579 with ERC1271 upgradeable transparent > Snapshot 1 @@ -4355,18 +4776,33 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerP256Upgradeable {␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerP256_init(qx, qy);␊ + __MultiSignerERC7913_init(signers, threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ // The following functions are overrides required by Solidity.␊ @@ -4388,14 +4824,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4403,7 +4839,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 with ERC7739 upgradeable transparent +## Account with SignerMultisig with ERC7579 with ERC7739 upgradeable transparent > Snapshot 1 @@ -4417,18 +4853,21 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerP256_init(qx, qy);␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4442,6 +4881,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -4453,14 +4904,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4468,7 +4919,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerP256 with ERC7579 hooks upgradeable transparent +## Account with SignerMultisig with ERC7579 hooks upgradeable transparent > Snapshot 1 @@ -4483,18 +4934,21 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerP256Upgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, MultiSignerERC7913Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + function initialize(bytes[] memory signers, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579Hooked_init();␊ - __SignerP256_init(qx, qy);␊ + __MultiSignerERC7913_init(signers, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4508,6 +4962,18 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -4519,14 +4985,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4534,7 +5000,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA named non-upgradeable +## Account with SignerMultisigWeighted named non-upgradeable > Snapshot 1 @@ -4545,17 +5011,36 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ ␊ - contract CustomAccountWithSignerRSA is Account, EIP712, ERC7739, SignerRSA {␊ - constructor(bytes memory e, bytes memory n)␊ - EIP712("CustomAccount with SignerRSA", "1")␊ - SignerRSA(e, n)␊ + contract CustomAccountWithSignerMultisigWeighted is Account, EIP712, ERC7739, MultiSignerERC7913Weighted {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigWeighted", "1")␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerRSA with ERC1271 non-upgradeable +## Account with SignerMultisigWeighted with ERC1271 non-upgradeable > Snapshot 1 @@ -4565,10 +5050,12 @@ Generated by [AVA](https://avajs.dev). ␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC1271 is Account, IERC1271, SignerRSA {␊ - constructor(bytes memory e, bytes memory n) SignerRSA(e, n) {}␊ + contract CustomAccountWithSignerMultisigWeightedERC1271 is Account, IERC1271, MultiSignerERC7913Weighted {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ + {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ public␊ @@ -4578,10 +5065,29 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerRSA with ERC7739 non-upgradeable +## Account with SignerMultisigWeighted with ERC7739 non-upgradeable > Snapshot 1 @@ -4592,17 +5098,36 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC7739 is Account, EIP712, ERC7739, SignerRSA {␊ - constructor(bytes memory e, bytes memory n)␊ - EIP712("CustomAccount with SignerRSAERC7739", "1")␊ - SignerRSA(e, n)␊ + contract CustomAccountWithSignerMultisigWeightedERC7739 is Account, EIP712, ERC7739, MultiSignerERC7913Weighted {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigWeightedERC7739", "1")␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerRSA with ERC721Holder non-upgradeable +## Account with SignerMultisigWeighted with ERC721Holder non-upgradeable > Snapshot 1 @@ -4614,39 +5139,77 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC721Holder is Account, EIP712, ERC7739, SignerRSA, ERC721Holder {␊ - constructor(bytes memory e, bytes memory n)␊ - EIP712("CustomAccount with SignerRSAERC721Holder", "1")␊ - SignerRSA(e, n)␊ + contract CustomAccountWithSignerMultisigWeightedERC721Holder is Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC721Holder {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigWeightedERC721Holder", "1")␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ - }␊ - ` - -## Account with SignerRSA with ERC1155Holder non-upgradeable - -> Snapshot 1 - - `// SPDX-License-Identifier: MIT␊ - // Compatible with OpenZeppelin Contracts ^5.5.0␊ - pragma solidity ^0.8.27;␊ ␊ - import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + }␊ + ` + +## Account with SignerMultisigWeighted with ERC1155Holder non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC1155Holder is Account, EIP712, ERC7739, SignerRSA, ERC1155Holder {␊ - constructor(bytes memory e, bytes memory n)␊ - EIP712("CustomAccount with SignerRSAERC1155Holder", "1")␊ - SignerRSA(e, n)␊ + contract CustomAccountWithSignerMultisigWeightedERC1155Holder is Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC1155Holder {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigWeightedERC1155Holder", "1")␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerRSA with ERC721Holder and ERC1155Holder non-upgradeable +## Account with SignerMultisigWeighted with ERC721Holder and ERC1155Holder non-upgradeable > Snapshot 1 @@ -4659,17 +5222,36 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC721HolderERC1155Holder is Account, EIP712, ERC7739, SignerRSA, ERC721Holder, ERC1155Holder {␊ - constructor(bytes memory e, bytes memory n)␊ - EIP712("CustomAccount with SignerRSAERC721HolderERC1155Holder", "1")␊ - SignerRSA(e, n)␊ + contract CustomAccountWithSignerMultisigWeightedERC721HolderERC1155Holder is Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC721Holder, ERC1155Holder {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + EIP712("CustomAccount with SignerMultisigWeightedERC721HolderERC1155Holder", "1")␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerRSA with ERC7821 Execution non-upgradeable +## Account with SignerMultisigWeighted with ERC7821 Execution non-upgradeable > Snapshot 1 @@ -4681,13 +5263,32 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, SignerRSA, ERC7821 {␊ - constructor(bytes memory e, bytes memory n)␊ + contract MyAccount is Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC7821 {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ EIP712("MyAccount", "1")␊ - SignerRSA(e, n)␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ internal␊ @@ -4700,7 +5301,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 non-upgradeable +## Account with SignerMultisigWeighted with ERC7579 non-upgradeable > Snapshot 1 @@ -4713,13 +5314,14 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerRSA {␊ - constructor(bytes memory e, bytes memory n)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913Weighted {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ EIP712("MyAccount", "1")␊ - SignerRSA(e, n)␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4733,6 +5335,25 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -4744,14 +5365,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSA is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ + // IMPORTANT: Make sure MultiSignerERC7913Weighted is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913Weighted)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSA, AbstractSigner, AccountERC7579)␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4759,7 +5380,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 with ERC1271 non-upgradeable +## Account with SignerMultisigWeighted with ERC7579 with ERC1271 non-upgradeable > Snapshot 1 @@ -4771,11 +5392,33 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, IERC1271, AccountERC7579, SignerRSA {␊ - constructor(bytes memory e, bytes memory n) SignerRSA(e, n) {}␊ + contract MyAccount is Account, IERC1271, AccountERC7579, MultiSignerERC7913Weighted {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ + {}␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -4796,14 +5439,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSA is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ + // IMPORTANT: Make sure MultiSignerERC7913Weighted is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913Weighted)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSA, AbstractSigner, AccountERC7579)␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4811,7 +5454,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 with ERC7739 non-upgradeable +## Account with SignerMultisigWeighted with ERC7579 with ERC7739 non-upgradeable > Snapshot 1 @@ -4824,13 +5467,14 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerRSA {␊ - constructor(bytes memory e, bytes memory n)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913Weighted {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ EIP712("MyAccount", "1")␊ - SignerRSA(e, n)␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4844,6 +5488,25 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -4855,14 +5518,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSA is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ + // IMPORTANT: Make sure MultiSignerERC7913Weighted is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913Weighted)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSA, AbstractSigner, AccountERC7579)␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4870,7 +5533,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 hooks non-upgradeable +## Account with SignerMultisigWeighted with ERC7579 hooks non-upgradeable > Snapshot 1 @@ -4884,13 +5547,14 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Hooked} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579Hooked.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, SignerRSA {␊ - constructor(bytes memory e, bytes memory n)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, MultiSignerERC7913Weighted {␊ + constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ EIP712("MyAccount", "1")␊ - SignerRSA(e, n)␊ + MultiSignerERC7913Weighted(signers, weights, threshold)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4905,24 +5569,43 @@ Generated by [AVA](https://avajs.dev). return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ ␊ - // The following functions are overrides required by Solidity.␊ - ␊ - function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ - internal␊ - override(Account, AccountERC7579)␊ - returns (uint256)␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ {␊ - return super._validateUserOp(userOp, userOpHash, signature);␊ + _setSignerWeights(signers, weights);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSA is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ - // to ensure the correct order of function resolution.␊ - // AccountERC7579 returns false for _rawSignatureValidation␊ - function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ - internal␊ - view␊ - override(SignerRSA, AbstractSigner, AccountERC7579)␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure MultiSignerERC7913Weighted is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913Weighted)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -4930,7 +5613,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA named upgradeable uups +## Account with SignerMultisigWeighted named upgradeable uups > Snapshot 1 @@ -4942,17 +5625,39 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSA is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeighted is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerRSA", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisigWeighted", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -4963,7 +5668,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC1271 upgradeable uups +## Account with SignerMultisigWeighted with ERC1271 upgradeable uups > Snapshot 1 @@ -4974,17 +5679,20 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC1271 is Initializable, Account, IERC1271, SignerRSAUpgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeightedERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -4995,6 +5703,25 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -5004,7 +5731,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7739 upgradeable uups +## Account with SignerMultisigWeighted with ERC7739 upgradeable uups > Snapshot 1 @@ -5016,17 +5743,41 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC7739 is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeightedERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerRSAERC7739", "1") {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigWeightedERC7739", "1")␊ + {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -5037,7 +5788,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC721Holder upgradeable uups +## Account with SignerMultisigWeighted with ERC721Holder upgradeable uups > Snapshot 1 @@ -5050,17 +5801,41 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC721Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC721Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeightedERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC721Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerRSAERC721Holder", "1") {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigWeightedERC721Holder", "1")␊ + {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -5071,7 +5846,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC1155Holder upgradeable uups +## Account with SignerMultisigWeighted with ERC1155Holder upgradeable uups > Snapshot 1 @@ -5084,17 +5859,41 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC1155Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeightedERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC1155Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerRSAERC1155Holder", "1") {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigWeightedERC1155Holder", "1")␊ + {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -5105,7 +5904,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC721Holder and ERC1155Holder upgradeable uups +## Account with SignerMultisigWeighted with ERC721Holder and ERC1155Holder upgradeable uups > Snapshot 1 @@ -5119,19 +5918,41 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeightedERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor()␊ - EIP712("CustomAccount with SignerRSAERC721HolderERC1155Holder", "1")␊ + EIP712("CustomAccount with SignerMultisigWeightedERC721HolderERC1155Holder", "1")␊ {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -5142,7 +5963,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7821 Execution upgradeable uups +## Account with SignerMultisigWeighted with ERC7821 Execution upgradeable uups > Snapshot 1 @@ -5155,23 +5976,45 @@ Generated by [AVA](https://avajs.dev). import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC7821, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC7821, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ - function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ - internal␊ - view␊ - override␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ returns (bool)␊ {␊ return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ @@ -5185,7 +6028,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 upgradeable uups +## Account with SignerMultisigWeighted with ERC7579 upgradeable uups > Snapshot 1 @@ -5199,19 +6042,23 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerRSAUpgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerRSA_init(e, n);␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -5225,6 +6072,25 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -5242,14 +6108,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -5257,7 +6123,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 with ERC1271 upgradeable uups +## Account with SignerMultisigWeighted with ERC7579 with ERC1271 upgradeable uups > Snapshot 1 @@ -5270,19 +6136,42 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerRSAUpgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerRSA_init(e, n);␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -5310,14 +6199,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -5325,7 +6214,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 with ERC7739 upgradeable uups +## Account with SignerMultisigWeighted with ERC7579 with ERC7739 upgradeable uups > Snapshot 1 @@ -5339,19 +6228,23 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerRSAUpgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerRSA_init(e, n);␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -5365,6 +6258,25 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -5382,14 +6294,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -5397,7 +6309,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 hooks upgradeable uups +## Account with SignerMultisigWeighted with ERC7579 hooks upgradeable uups > Snapshot 1 @@ -5412,19 +6324,23 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerRSAUpgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579Hooked_init();␊ - __SignerRSA_init(e, n);␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -5438,6 +6354,25 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -5455,14 +6390,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -5470,7 +6405,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA named upgradeable transparent +## Account with SignerMultisigWeighted named upgradeable transparent > Snapshot 1 @@ -5482,21 +6417,43 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSA is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeighted is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerRSA", "1") {␊ + constructor() EIP712("CustomAccount with SignerMultisigWeighted", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerRSA with ERC1271 upgradeable transparent +## Account with SignerMultisigWeighted with ERC1271 upgradeable transparent > Snapshot 1 @@ -5507,16 +6464,19 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC1271 is Initializable, Account, IERC1271, SignerRSAUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeightedERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913WeightedUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -5527,10 +6487,29 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ }␊ ` -## Account with SignerRSA with ERC7739 upgradeable transparent +## Account with SignerMultisigWeighted with ERC7739 upgradeable transparent > Snapshot 1 @@ -5542,21 +6521,45 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC7739 is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable {␊ + contract CustomAccountWithSignerMultisigWeightedERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerRSAERC7739", "1") {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigWeightedERC7739", "1")␊ + {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerRSA with ERC721Holder upgradeable transparent +## Account with SignerMultisigWeighted with ERC721Holder upgradeable transparent > Snapshot 1 @@ -5569,21 +6572,45 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC721Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC721Holder {␊ + contract CustomAccountWithSignerMultisigWeightedERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC721Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerRSAERC721Holder", "1") {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigWeightedERC721Holder", "1")␊ + {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerRSA with ERC1155Holder upgradeable transparent +## Account with SignerMultisigWeighted with ERC1155Holder upgradeable transparent > Snapshot 1 @@ -5596,21 +6623,45 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC1155Holder {␊ + contract CustomAccountWithSignerMultisigWeightedERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC1155Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerRSAERC1155Holder", "1") {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigWeightedERC1155Holder", "1")␊ + {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerRSA with ERC721Holder and ERC1155Holder upgradeable transparent +## Account with SignerMultisigWeighted with ERC721Holder and ERC1155Holder upgradeable transparent > Snapshot 1 @@ -5624,23 +6675,45 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerRSAERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC721Holder, ERC1155Holder {␊ + contract CustomAccountWithSignerMultisigWeightedERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC721Holder, ERC1155Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor()␊ - EIP712("CustomAccount with SignerRSAERC721HolderERC1155Holder", "1")␊ + EIP712("CustomAccount with SignerMultisigWeightedERC721HolderERC1155Holder", "1")␊ {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ }␊ ` -## Account with SignerRSA with ERC7821 Execution upgradeable transparent +## Account with SignerMultisigWeighted with ERC7821 Execution upgradeable transparent > Snapshot 1 @@ -5653,16 +6726,38 @@ Generated by [AVA](https://avajs.dev). import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC7821 {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC7821 {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ - __SignerRSA_init(e, n);␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ @@ -5676,7 +6771,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 upgradeable transparent +## Account with SignerMultisigWeighted with ERC7579 upgradeable transparent > Snapshot 1 @@ -5690,18 +6785,22 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerRSAUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerRSA_init(e, n);␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -5715,6 +6814,25 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -5726,14 +6844,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -5741,7 +6859,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 with ERC1271 upgradeable transparent +## Account with SignerMultisigWeighted with ERC7579 with ERC1271 upgradeable transparent > Snapshot 1 @@ -5754,18 +6872,41 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerRSAUpgradeable {␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerRSA_init(e, n);␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ }␊ ␊ // The following functions are overrides required by Solidity.␊ @@ -5787,14 +6928,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -5802,7 +6943,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 with ERC7739 upgradeable transparent +## Account with SignerMultisigWeighted with ERC7579 with ERC7739 upgradeable transparent > Snapshot 1 @@ -5816,18 +6957,22 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerRSAUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579_init();␊ - __SignerRSA_init(e, n);␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -5842,7 +6987,26 @@ Generated by [AVA](https://avajs.dev). return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ ␊ - // The following functions are overrides required by Solidity.␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ ␊ function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ internal␊ @@ -5852,14 +7016,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -5867,7 +7031,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerRSA with ERC7579 hooks upgradeable transparent +## Account with SignerMultisigWeighted with ERC7579 hooks upgradeable transparent > Snapshot 1 @@ -5882,18 +7046,22 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ - import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerRSAUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, MultiSignerERC7913WeightedUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes memory e, bytes memory n) public initializer {␊ + function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + public␊ + initializer␊ + {␊ __AccountERC7579Hooked_init();␊ - __SignerRSA_init(e, n);␊ + __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -5907,6 +7075,25 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -5918,14 +7105,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -5933,7 +7120,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig named non-upgradeable +## Account with SignerP256 named non-upgradeable > Snapshot 1 @@ -5944,29 +7131,17 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract CustomAccountWithSignerMultisig is Account, EIP712, ERC7739, MultiSignerERC7913 {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisig", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + contract CustomAccountWithSignerP256 is Account, EIP712, ERC7739, SignerP256 {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerP256", "1")␊ + SignerP256(qx, qy)␊ {}␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisig with ERC1271 non-upgradeable +## Account with SignerP256 with ERC1271 non-upgradeable > Snapshot 1 @@ -5976,12 +7151,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC1271 is Account, IERC1271, MultiSignerERC7913 {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ - MultiSignerERC7913(signers, threshold)␊ - {}␊ + contract CustomAccountWithSignerP256ERC1271 is Account, IERC1271, SignerP256 {␊ + constructor(bytes32 qx, bytes32 qy) SignerP256(qx, qy) {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ public␊ @@ -5991,22 +7164,10 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisig with ERC7739 non-upgradeable +## Account with SignerP256 with ERC7739 non-upgradeable > Snapshot 1 @@ -6017,29 +7178,17 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC7739 is Account, EIP712, ERC7739, MultiSignerERC7913 {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigERC7739", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + contract CustomAccountWithSignerP256ERC7739 is Account, EIP712, ERC7739, SignerP256 {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerP256ERC7739", "1")␊ + SignerP256(qx, qy)␊ {}␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisig with ERC721Holder non-upgradeable +## Account with SignerP256 with ERC721Holder non-upgradeable > Snapshot 1 @@ -6051,29 +7200,17 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC721Holder is Account, EIP712, ERC7739, MultiSignerERC7913, ERC721Holder {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigERC721Holder", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + contract CustomAccountWithSignerP256ERC721Holder is Account, EIP712, ERC7739, SignerP256, ERC721Holder {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerP256ERC721Holder", "1")␊ + SignerP256(qx, qy)␊ {}␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisig with ERC1155Holder non-upgradeable +## Account with SignerP256 with ERC1155Holder non-upgradeable > Snapshot 1 @@ -6085,29 +7222,17 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC1155Holder is Account, EIP712, ERC7739, MultiSignerERC7913, ERC1155Holder {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigERC1155Holder", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + contract CustomAccountWithSignerP256ERC1155Holder is Account, EIP712, ERC7739, SignerP256, ERC1155Holder {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerP256ERC1155Holder", "1")␊ + SignerP256(qx, qy)␊ {}␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisig with ERC721Holder and ERC1155Holder non-upgradeable +## Account with SignerP256 with ERC721Holder and ERC1155Holder non-upgradeable > Snapshot 1 @@ -6120,29 +7245,17 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC721HolderERC1155Holder is Account, EIP712, ERC7739, MultiSignerERC7913, ERC721Holder, ERC1155Holder {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigERC721HolderERC1155Holder", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + contract CustomAccountWithSignerP256ERC721HolderERC1155Holder is Account, EIP712, ERC7739, SignerP256, ERC721Holder, ERC1155Holder {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerP256ERC721HolderERC1155Holder", "1")␊ + SignerP256(qx, qy)␊ {}␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisig with ERC7821 Execution non-upgradeable +## Account with SignerP256 with ERC7821 Execution non-upgradeable > Snapshot 1 @@ -6154,25 +7267,13 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, MultiSignerERC7913, ERC7821 {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ + contract MyAccount is Account, EIP712, ERC7739, SignerP256, ERC7821 {␊ + constructor(bytes32 qx, bytes32 qy)␊ EIP712("MyAccount", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + SignerP256(qx, qy)␊ {}␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ internal␊ @@ -6185,7 +7286,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 non-upgradeable +## Account with SignerP256 with ERC7579 non-upgradeable > Snapshot 1 @@ -6198,13 +7299,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913 {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerP256 {␊ + constructor(bytes32 qx, bytes32 qy)␊ EIP712("MyAccount", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + SignerP256(qx, qy)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -6218,18 +7319,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -6241,14 +7330,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913 is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913)␊ + // IMPORTANT: Make sure SignerP256 is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + override(SignerP256, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -6256,7 +7345,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 with ERC1271 non-upgradeable +## Account with SignerP256 with ERC7579 with ERC1271 non-upgradeable > Snapshot 1 @@ -6268,25 +7357,11 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, IERC1271, AccountERC7579, MultiSignerERC7913 {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ - MultiSignerERC7913(signers, threshold)␊ - {}␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ + contract MyAccount is Account, IERC1271, AccountERC7579, SignerP256 {␊ + constructor(bytes32 qx, bytes32 qy) SignerP256(qx, qy) {}␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -6307,14 +7382,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913 is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913)␊ + // IMPORTANT: Make sure SignerP256 is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + override(SignerP256, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -6322,7 +7397,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 with ERC7739 non-upgradeable +## Account with SignerP256 with ERC7579 with ERC7739 non-upgradeable > Snapshot 1 @@ -6335,13 +7410,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913 {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerP256 {␊ + constructor(bytes32 qx, bytes32 qy)␊ EIP712("MyAccount", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + SignerP256(qx, qy)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -6355,18 +7430,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -6378,14 +7441,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913 is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913)␊ + // IMPORTANT: Make sure SignerP256 is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + override(SignerP256, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -6393,7 +7456,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 hooks non-upgradeable +## Account with SignerP256 with ERC7579 hooks non-upgradeable > Snapshot 1 @@ -6407,13 +7470,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Hooked} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579Hooked.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, MultiSignerERC7913 {␊ - constructor(bytes[] memory signers, uint64 threshold)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, SignerP256 {␊ + constructor(bytes32 qx, bytes32 qy)␊ EIP712("MyAccount", "1")␊ - MultiSignerERC7913(signers, threshold)␊ + SignerP256(qx, qy)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -6427,18 +7490,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -6450,14 +7501,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913 is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913)␊ + // IMPORTANT: Make sure SignerP256 is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + override(SignerP256, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -6465,7 +7516,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig named upgradeable uups +## Account with SignerP256 named upgradeable uups > Snapshot 1 @@ -6477,32 +7528,17 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisig is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerP256 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisig", "1") {␊ + constructor() EIP712("CustomAccount with SignerP256", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -6513,7 +7549,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC1271 upgradeable uups +## Account with SignerP256 with ERC1271 upgradeable uups > Snapshot 1 @@ -6524,20 +7560,17 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerP256ERC1271 is Initializable, Account, IERC1271, SignerP256Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -6548,18 +7581,6 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -6569,7 +7590,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7739 upgradeable uups +## Account with SignerP256 with ERC7739 upgradeable uups > Snapshot 1 @@ -6581,32 +7602,17 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerP256ERC7739 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisigERC7739", "1") {␊ + constructor() EIP712("CustomAccount with SignerP256ERC7739", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -6617,7 +7623,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC721Holder upgradeable uups +## Account with SignerP256 with ERC721Holder upgradeable uups > Snapshot 1 @@ -6630,32 +7636,17 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC721Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerP256ERC721Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC721Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisigERC721Holder", "1") {␊ + constructor() EIP712("CustomAccount with SignerP256ERC721Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -6666,7 +7657,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC1155Holder upgradeable uups +## Account with SignerP256 with ERC1155Holder upgradeable uups > Snapshot 1 @@ -6679,32 +7670,17 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC1155Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerP256ERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC1155Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisigERC1155Holder", "1") {␊ + constructor() EIP712("CustomAccount with SignerP256ERC1155Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -6715,7 +7691,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC721Holder and ERC1155Holder upgradeable uups +## Account with SignerP256 with ERC721Holder and ERC1155Holder upgradeable uups > Snapshot 1 @@ -6729,34 +7705,19 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerP256ERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor()␊ - EIP712("CustomAccount with SignerMultisigERC721HolderERC1155Holder", "1")␊ + EIP712("CustomAccount with SignerP256ERC721HolderERC1155Holder", "1")␊ {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -6767,7 +7728,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7821 Execution upgradeable uups +## Account with SignerP256 with ERC7821 Execution upgradeable uups > Snapshot 1 @@ -6780,32 +7741,17 @@ Generated by [AVA](https://avajs.dev). import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC7821, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC7821, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ @@ -6825,7 +7771,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 upgradeable uups +## Account with SignerP256 with ERC7579 upgradeable uups > Snapshot 1 @@ -6839,22 +7785,19 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913_init(signers, threshold);␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -6868,18 +7811,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -6897,14 +7828,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ + // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -6912,7 +7843,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 with ERC1271 upgradeable uups +## Account with SignerP256 with ERC7579 with ERC1271 upgradeable uups > Snapshot 1 @@ -6925,34 +7856,19 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerP256Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -6980,14 +7896,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ + // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -6995,7 +7911,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 with ERC7739 upgradeable uups +## Account with SignerP256 with ERC7579 with ERC7739 upgradeable uups > Snapshot 1 @@ -7009,22 +7925,19 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913_init(signers, threshold);␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -7038,18 +7951,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -7067,14 +7968,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ + // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -7082,7 +7983,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 hooks upgradeable uups +## Account with SignerP256 with ERC7579 hooks upgradeable uups > Snapshot 1 @@ -7097,22 +7998,19 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, MultiSignerERC7913Upgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerP256Upgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579Hooked_init();␊ - __MultiSignerERC7913_init(signers, threshold);␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -7126,18 +8024,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -7155,14 +8041,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ + // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -7170,7 +8056,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig named upgradeable transparent +## Account with SignerP256 named upgradeable transparent > Snapshot 1 @@ -7182,36 +8068,21 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisig is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable {␊ + contract CustomAccountWithSignerP256 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisig", "1") {␊ + constructor() EIP712("CustomAccount with SignerP256", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ }␊ ` -## Account with SignerMultisig with ERC1271 upgradeable transparent +## Account with SignerP256 with ERC1271 upgradeable transparent > Snapshot 1 @@ -7222,19 +8093,16 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913Upgradeable {␊ + contract CustomAccountWithSignerP256ERC1271 is Initializable, Account, IERC1271, SignerP256Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -7245,22 +8113,10 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisig with ERC7739 upgradeable transparent +## Account with SignerP256 with ERC7739 upgradeable transparent > Snapshot 1 @@ -7272,36 +8128,21 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable {␊ + contract CustomAccountWithSignerP256ERC7739 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisigERC7739", "1") {␊ + constructor() EIP712("CustomAccount with SignerP256ERC7739", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ }␊ ` -## Account with SignerMultisig with ERC721Holder upgradeable transparent +## Account with SignerP256 with ERC721Holder upgradeable transparent > Snapshot 1 @@ -7314,36 +8155,21 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC721Holder {␊ + contract CustomAccountWithSignerP256ERC721Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC721Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisigERC721Holder", "1") {␊ + constructor() EIP712("CustomAccount with SignerP256ERC721Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ }␊ ` -## Account with SignerMultisig with ERC1155Holder upgradeable transparent +## Account with SignerP256 with ERC1155Holder upgradeable transparent > Snapshot 1 @@ -7356,36 +8182,21 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC1155Holder {␊ + contract CustomAccountWithSignerP256ERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC1155Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisigERC1155Holder", "1") {␊ + constructor() EIP712("CustomAccount with SignerP256ERC1155Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ }␊ ` -## Account with SignerMultisig with ERC721Holder and ERC1155Holder upgradeable transparent +## Account with SignerP256 with ERC721Holder and ERC1155Holder upgradeable transparent > Snapshot 1 @@ -7399,38 +8210,23 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC721Holder, ERC1155Holder {␊ + contract CustomAccountWithSignerP256ERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC721Holder, ERC1155Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor()␊ - EIP712("CustomAccount with SignerMultisigERC721HolderERC1155Holder", "1")␊ + EIP712("CustomAccount with SignerP256ERC721HolderERC1155Holder", "1")␊ {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ }␊ ` -## Account with SignerMultisig with ERC7821 Execution upgradeable transparent +## Account with SignerP256 with ERC7821 Execution upgradeable transparent > Snapshot 1 @@ -7443,31 +8239,16 @@ Generated by [AVA](https://avajs.dev). import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Upgradeable, ERC7821 {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, ERC7821 {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ @@ -7481,7 +8262,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 upgradeable transparent +## Account with SignerP256 with ERC7579 upgradeable transparent > Snapshot 1 @@ -7495,21 +8276,18 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913_init(signers, threshold);␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -7523,18 +8301,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -7546,14 +8312,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ + // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -7561,7 +8327,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 with ERC1271 upgradeable transparent +## Account with SignerP256 with ERC7579 with ERC1271 upgradeable transparent > Snapshot 1 @@ -7574,33 +8340,18 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable {␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerP256Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913_init(signers, threshold);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ // The following functions are overrides required by Solidity.␊ @@ -7622,14 +8373,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ + // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -7637,7 +8388,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 with ERC7739 upgradeable transparent +## Account with SignerP256 with ERC7579 with ERC7739 upgradeable transparent > Snapshot 1 @@ -7651,21 +8402,18 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913Upgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913_init(signers, threshold);␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -7679,18 +8427,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -7702,14 +8438,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ + // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -7717,7 +8453,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisig with ERC7579 hooks upgradeable transparent +## Account with SignerP256 with ERC7579 hooks upgradeable transparent > Snapshot 1 @@ -7732,21 +8468,18 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, MultiSignerERC7913Upgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerP256Upgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579Hooked_init();␊ - __MultiSignerERC7913_init(signers, threshold);␊ + __SignerP256_init(qx, qy);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -7760,18 +8493,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -7783,14 +8504,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Upgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913Upgradeable)␊ + // IMPORTANT: Make sure SignerP256Upgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerP256Upgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerP256Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -7798,7 +8519,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted named non-upgradeable +## Account with SignerRSA named non-upgradeable > Snapshot 1 @@ -7809,36 +8530,17 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeighted is Account, EIP712, ERC7739, MultiSignerERC7913Weighted {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigWeighted", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + contract CustomAccountWithSignerRSA is Account, EIP712, ERC7739, SignerRSA {␊ + constructor(bytes memory e, bytes memory n)␊ + EIP712("CustomAccount with SignerRSA", "1")␊ + SignerRSA(e, n)␊ {}␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC1271 non-upgradeable +## Account with SignerRSA with ERC1271 non-upgradeable > Snapshot 1 @@ -7848,12 +8550,10 @@ Generated by [AVA](https://avajs.dev). ␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC1271 is Account, IERC1271, MultiSignerERC7913Weighted {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ - {}␊ + contract CustomAccountWithSignerRSAERC1271 is Account, IERC1271, SignerRSA {␊ + constructor(bytes memory e, bytes memory n) SignerRSA(e, n) {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ public␊ @@ -7863,29 +8563,10 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC7739 non-upgradeable +## Account with SignerRSA with ERC7739 non-upgradeable > Snapshot 1 @@ -7896,36 +8577,17 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC7739 is Account, EIP712, ERC7739, MultiSignerERC7913Weighted {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigWeightedERC7739", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + contract CustomAccountWithSignerRSAERC7739 is Account, EIP712, ERC7739, SignerRSA {␊ + constructor(bytes memory e, bytes memory n)␊ + EIP712("CustomAccount with SignerRSAERC7739", "1")␊ + SignerRSA(e, n)␊ {}␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC721Holder non-upgradeable +## Account with SignerRSA with ERC721Holder non-upgradeable > Snapshot 1 @@ -7937,36 +8599,17 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC721Holder is Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC721Holder {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigWeightedERC721Holder", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + contract CustomAccountWithSignerRSAERC721Holder is Account, EIP712, ERC7739, SignerRSA, ERC721Holder {␊ + constructor(bytes memory e, bytes memory n)␊ + EIP712("CustomAccount with SignerRSAERC721Holder", "1")␊ + SignerRSA(e, n)␊ {}␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC1155Holder non-upgradeable +## Account with SignerRSA with ERC1155Holder non-upgradeable > Snapshot 1 @@ -7978,36 +8621,17 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC1155Holder is Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC1155Holder {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigWeightedERC1155Holder", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + contract CustomAccountWithSignerRSAERC1155Holder is Account, EIP712, ERC7739, SignerRSA, ERC1155Holder {␊ + constructor(bytes memory e, bytes memory n)␊ + EIP712("CustomAccount with SignerRSAERC1155Holder", "1")␊ + SignerRSA(e, n)␊ {}␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC721Holder and ERC1155Holder non-upgradeable +## Account with SignerRSA with ERC721Holder and ERC1155Holder non-upgradeable > Snapshot 1 @@ -8020,36 +8644,17 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC721HolderERC1155Holder is Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC721Holder, ERC1155Holder {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - EIP712("CustomAccount with SignerMultisigWeightedERC721HolderERC1155Holder", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + contract CustomAccountWithSignerRSAERC721HolderERC1155Holder is Account, EIP712, ERC7739, SignerRSA, ERC721Holder, ERC1155Holder {␊ + constructor(bytes memory e, bytes memory n)␊ + EIP712("CustomAccount with SignerRSAERC721HolderERC1155Holder", "1")␊ + SignerRSA(e, n)␊ {}␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC7821 Execution non-upgradeable +## Account with SignerRSA with ERC7821 Execution non-upgradeable > Snapshot 1 @@ -8061,32 +8666,13 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC7821 {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + contract MyAccount is Account, EIP712, ERC7739, SignerRSA, ERC7821 {␊ + constructor(bytes memory e, bytes memory n)␊ EIP712("MyAccount", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + SignerRSA(e, n)␊ {}␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ internal␊ @@ -8099,7 +8685,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 non-upgradeable +## Account with SignerRSA with ERC7579 non-upgradeable > Snapshot 1 @@ -8112,14 +8698,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913Weighted {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerRSA {␊ + constructor(bytes memory e, bytes memory n)␊ EIP712("MyAccount", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + SignerRSA(e, n)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -8133,25 +8718,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -8163,14 +8729,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Weighted is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913Weighted)␊ + // IMPORTANT: Make sure SignerRSA is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + override(SignerRSA, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -8178,7 +8744,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 with ERC1271 non-upgradeable +## Account with SignerRSA with ERC7579 with ERC1271 non-upgradeable > Snapshot 1 @@ -8190,33 +8756,11 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, IERC1271, AccountERC7579, MultiSignerERC7913Weighted {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ - {}␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ + contract MyAccount is Account, IERC1271, AccountERC7579, SignerRSA {␊ + constructor(bytes memory e, bytes memory n) SignerRSA(e, n) {}␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -8237,14 +8781,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Weighted is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913Weighted)␊ + // IMPORTANT: Make sure SignerRSA is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + override(SignerRSA, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -8252,7 +8796,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 with ERC7739 non-upgradeable +## Account with SignerRSA with ERC7579 with ERC7739 non-upgradeable > Snapshot 1 @@ -8265,14 +8809,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913Weighted {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerRSA {␊ + constructor(bytes memory e, bytes memory n)␊ EIP712("MyAccount", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + SignerRSA(e, n)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -8286,25 +8829,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -8316,14 +8840,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Weighted is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913Weighted)␊ + // IMPORTANT: Make sure SignerRSA is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + override(SignerRSA, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -8331,7 +8855,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 hooks non-upgradeable +## Account with SignerRSA with ERC7579 hooks non-upgradeable > Snapshot 1 @@ -8345,14 +8869,13 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Hooked} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579Hooked.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ - import {MultiSignerERC7913} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol";␊ - import {MultiSignerERC7913Weighted} from "@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSA} from "@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol";␊ ␊ - contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, MultiSignerERC7913Weighted {␊ - constructor(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, SignerRSA {␊ + constructor(bytes memory e, bytes memory n)␊ EIP712("MyAccount", "1")␊ - MultiSignerERC7913Weighted(signers, weights, threshold)␊ + SignerRSA(e, n)␊ {}␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -8366,25 +8889,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -8396,14 +8900,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913Weighted is more derived than AccountERC7579␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., MultiSignerERC7913Weighted)␊ + // IMPORTANT: Make sure SignerRSA is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579 returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + override(SignerRSA, AbstractSigner, AccountERC7579)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -8411,7 +8915,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted named upgradeable uups +## Account with SignerRSA named upgradeable uups > Snapshot 1 @@ -8423,39 +8927,17 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeighted is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerRSA is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisigWeighted", "1") {␊ + constructor() EIP712("CustomAccount with SignerRSA", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -8466,7 +8948,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC1271 upgradeable uups +## Account with SignerRSA with ERC1271 upgradeable uups > Snapshot 1 @@ -8477,20 +8959,17 @@ Generated by [AVA](https://avajs.dev). import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerRSAERC1271 is Initializable, Account, IERC1271, SignerRSAUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -8501,25 +8980,6 @@ Generated by [AVA](https://avajs.dev). {␊ return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -8529,7 +8989,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7739 upgradeable uups +## Account with SignerRSA with ERC7739 upgradeable uups > Snapshot 1 @@ -8541,41 +9001,17 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ + contract CustomAccountWithSignerRSAERC7739 is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor()␊ - EIP712("CustomAccount with SignerMultisigWeightedERC7739", "1")␊ - {␊ + constructor() EIP712("CustomAccount with SignerRSAERC7739", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -8586,7 +9022,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC721Holder upgradeable uups +## Account with SignerRSA with ERC721Holder upgradeable uups > Snapshot 1 @@ -8599,41 +9035,17 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC721Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerRSAERC721Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC721Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor()␊ - EIP712("CustomAccount with SignerMultisigWeightedERC721Holder", "1")␊ - {␊ + constructor() EIP712("CustomAccount with SignerRSAERC721Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -8644,7 +9056,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC1155Holder upgradeable uups +## Account with SignerRSA with ERC1155Holder upgradeable uups > Snapshot 1 @@ -8657,41 +9069,17 @@ Generated by [AVA](https://avajs.dev). import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC1155Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerRSAERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC1155Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor()␊ - EIP712("CustomAccount with SignerMultisigWeightedERC1155Holder", "1")␊ - {␊ + constructor() EIP712("CustomAccount with SignerRSAERC1155Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -8702,7 +9090,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC721Holder and ERC1155Holder upgradeable uups +## Account with SignerRSA with ERC721Holder and ERC1155Holder upgradeable uups > Snapshot 1 @@ -8716,41 +9104,19 @@ Generated by [AVA](https://avajs.dev). import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ + contract CustomAccountWithSignerRSAERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor()␊ - EIP712("CustomAccount with SignerMultisigWeightedERC721HolderERC1155Holder", "1")␊ + EIP712("CustomAccount with SignerRSAERC721HolderERC1155Holder", "1")␊ {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -8761,7 +9127,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7821 Execution upgradeable uups +## Account with SignerRSA with ERC7821 Execution upgradeable uups > Snapshot 1 @@ -8774,48 +9140,134 @@ Generated by [AVA](https://avajs.dev). import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC7821, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC7821, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ + }␊ ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ {␊ - _setSignerWeights(signers, weights);␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ }␊ ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerRSAUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ }␊ ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __AccountERC7579_init();␊ + __SignerRSA_init(e, n);␊ }␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579Upgradeable, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ ␊ - function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + function _authorizeUpgrade(address newImplementation)␊ internal␊ - view␊ override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579Upgradeable)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ - return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 with ERC1271 upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerRSAUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __AccountERC7579_init();␊ + __SignerRSA_init(e, n);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -8823,10 +9275,42 @@ Generated by [AVA](https://avajs.dev). override␊ onlyEntryPointOrSelf␊ {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579Upgradeable)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(IERC1271, AccountERC7579Upgradeable)␊ + returns (bytes4)␊ + {␊ + return super.isValidSignature(hash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC7579 upgradeable uups +## Account with SignerRSA with ERC7579 with ERC7739 upgradeable uups > Snapshot 1 @@ -8840,23 +9324,19 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerRSAUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + __SignerRSA_init(e, n);␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -8871,23 +9351,1458 @@ Generated by [AVA](https://avajs.dev). return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579Upgradeable)␊ + returns (uint256)␊ {␊ - _setSignerWeights(signers, weights);␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ + // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ }␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 hooks upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ + import {AccountERC7579HookedUpgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579HookedUpgradeable.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerRSAUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ }␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __AccountERC7579Hooked_init();␊ + __SignerRSA_init(e, n);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579Upgradeable, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579Upgradeable)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerRSA named upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerRSA is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("CustomAccount with SignerRSA", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC1271 upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerRSAERC1271 is Initializable, Account, IERC1271, SignerRSAUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override␊ + returns (bytes4)␊ + {␊ + return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7739 upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerRSAERC7739 is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("CustomAccount with SignerRSAERC7739", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC721Holder upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerRSAERC721Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC721Holder {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("CustomAccount with SignerRSAERC721Holder", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC1155Holder upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerRSAERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC1155Holder {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("CustomAccount with SignerRSAERC1155Holder", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC721Holder and ERC1155Holder upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerRSAERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC721Holder, ERC1155Holder {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor()␊ + EIP712("CustomAccount with SignerRSAERC721HolderERC1155Holder", "1")␊ + {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7821 Execution upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerRSAUpgradeable, ERC7821 {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __SignerRSA_init(e, n);␊ + }␊ + ␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerRSAUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __AccountERC7579_init();␊ + __SignerRSA_init(e, n);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579Upgradeable, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579Upgradeable)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 with ERC1271 upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerRSAUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __AccountERC7579_init();␊ + __SignerRSA_init(e, n);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579Upgradeable)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(IERC1271, AccountERC7579Upgradeable)␊ + returns (bytes4)␊ + {␊ + return super.isValidSignature(hash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 with ERC7739 upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerRSAUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __AccountERC7579_init();␊ + __SignerRSA_init(e, n);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579Upgradeable, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579Upgradeable)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 hooks upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ + import {AccountERC7579HookedUpgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579HookedUpgradeable.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSAUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerRSAUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerRSAUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes memory e, bytes memory n) public initializer {␊ + __AccountERC7579Hooked_init();␊ + __SignerRSA_init(e, n);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579Upgradeable, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579Upgradeable)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSAUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerRSAUpgradeable)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSAUpgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn named non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthn is Account, EIP712, ERC7739, SignerP256, SignerWebAuthn {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerWebAuthn", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC1271 non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC1271 is Account, IERC1271, SignerP256, SignerWebAuthn {␊ + constructor(bytes32 qx, bytes32 qy) SignerP256(qx, qy) {}␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override␊ + returns (bytes4)␊ + {␊ + return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7739 non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC7739 is Account, EIP712, ERC7739, SignerP256, SignerWebAuthn {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerWebAuthnERC7739", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC721Holder non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC721Holder is Account, EIP712, ERC7739, SignerP256, SignerWebAuthn, ERC721Holder {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerWebAuthnERC721Holder", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC1155Holder non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC1155Holder is Account, EIP712, ERC7739, SignerP256, SignerWebAuthn, ERC1155Holder {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerWebAuthnERC1155Holder", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC721Holder and ERC1155Holder non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC721HolderERC1155Holder is Account, EIP712, ERC7739, SignerP256, SignerWebAuthn, ERC721Holder, ERC1155Holder {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("CustomAccount with SignerWebAuthnERC721HolderERC1155Holder", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7821 Execution non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract MyAccount is Account, EIP712, ERC7739, SignerP256, SignerWebAuthn, ERC7821 {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("MyAccount", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7579 non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerP256, SignerWebAuthn {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("MyAccount", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerWebAuthn is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerWebAuthn)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7579 with ERC1271 non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract MyAccount is Account, IERC1271, AccountERC7579, SignerP256, SignerWebAuthn {␊ + constructor(bytes32 qx, bytes32 qy) SignerP256(qx, qy) {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(IERC1271, AccountERC7579)␊ + returns (bytes4)␊ + {␊ + return super.isValidSignature(hash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerWebAuthn is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerWebAuthn)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7579 with ERC7739 non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerP256, SignerWebAuthn {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("MyAccount", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerWebAuthn is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerWebAuthn)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7579 hooks non-upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579.sol";␊ + import {AccountERC7579Hooked} from "@openzeppelin/contracts/account/extensions/draft-AccountERC7579Hooked.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol";␊ + import {SignerWebAuthn} from "@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol";␊ + ␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, SignerP256, SignerWebAuthn {␊ + constructor(bytes32 qx, bytes32 qy)␊ + EIP712("MyAccount", "1")␊ + SignerP256(qx, qy)␊ + {}␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash, bytes calldata signature)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerWebAuthn is more derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerWebAuthn)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for _rawSignatureValidation␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthn, AbstractSigner, SignerP256, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn named upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthn is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("CustomAccount with SignerWebAuthn", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC1271 upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC1271 is Initializable, Account, IERC1271, SignerP256Upgradeable, SignerWebAuthnUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override␊ + returns (bytes4)␊ + {␊ + return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7739 upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC7739 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("CustomAccount with SignerWebAuthnERC7739", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC721Holder upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC721Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, ERC721Holder, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("CustomAccount with SignerWebAuthnERC721Holder", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC1155Holder upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, ERC1155Holder, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("CustomAccount with SignerWebAuthnERC1155Holder", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC721Holder and ERC1155Holder upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract CustomAccountWithSignerWebAuthnERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, ERC721Holder, ERC1155Holder, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor()␊ + EIP712("CustomAccount with SignerWebAuthnERC721HolderERC1155Holder", "1")␊ + {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7821 Execution upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, ERC7821, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ + }␊ + ␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyEntryPointOrSelf␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerWebAuthn with ERC7579 upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.5.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ + import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable, SignerWebAuthnUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __AccountERC7579_init();␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579Upgradeable, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -8906,14 +10821,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ + // IMPORTANT: Make sure SignerWebAuthnUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerWebAuthnUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -8921,7 +10836,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 with ERC1271 upgradeable uups +## Account with SignerWebAuthn with ERC7579 with ERC1271 upgradeable uups > Snapshot 1 @@ -8934,42 +10849,21 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerP256Upgradeable, SignerWebAuthnUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ @@ -8997,14 +10891,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ + // IMPORTANT: Make sure SignerWebAuthnUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerWebAuthnUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -9012,7 +10906,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 with ERC7739 upgradeable uups +## Account with SignerWebAuthn with ERC7579 with ERC7739 upgradeable uups > Snapshot 1 @@ -9026,23 +10920,21 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable, SignerWebAuthnUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -9056,25 +10948,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -9092,14 +10965,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ + // IMPORTANT: Make sure SignerWebAuthnUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerWebAuthnUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -9107,7 +10980,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 hooks upgradeable uups +## Account with SignerWebAuthn with ERC7579 hooks upgradeable uups > Snapshot 1 @@ -9122,23 +10995,21 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, MultiSignerERC7913WeightedUpgradeable, UUPSUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerP256Upgradeable, SignerWebAuthnUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579Hooked_init();␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -9152,25 +11023,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ @@ -9188,14 +11040,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ + // IMPORTANT: Make sure SignerWebAuthnUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerWebAuthnUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -9203,7 +11055,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted named upgradeable transparent +## Account with SignerWebAuthn named upgradeable transparent > Snapshot 1 @@ -9211,47 +11063,39 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.5.0␊ pragma solidity ^0.8.27;␊ ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeighted is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable {␊ + contract CustomAccountWithSignerWebAuthn is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor() EIP712("CustomAccount with SignerMultisigWeighted", "1") {␊ + constructor() EIP712("CustomAccount with SignerWebAuthn", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ + // The following functions are overrides required by Solidity.␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC1271 upgradeable transparent +## Account with SignerWebAuthn with ERC1271 upgradeable transparent > Snapshot 1 @@ -9259,22 +11103,22 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.5.0␊ pragma solidity ^0.8.27;␊ ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913WeightedUpgradeable {␊ + contract CustomAccountWithSignerWebAuthnERC1271 is Initializable, Account, IERC1271, SignerP256Upgradeable, SignerWebAuthnUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -9286,28 +11130,20 @@ Generated by [AVA](https://avajs.dev). return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ }␊ ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ + // The following functions are overrides required by Solidity.␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC7739 upgradeable transparent +## Account with SignerWebAuthn with ERC7739 upgradeable transparent > Snapshot 1 @@ -9315,49 +11151,39 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.5.0␊ pragma solidity ^0.8.27;␊ ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable {␊ + contract CustomAccountWithSignerWebAuthnERC7739 is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor()␊ - EIP712("CustomAccount with SignerMultisigWeightedERC7739", "1")␊ - {␊ + constructor() EIP712("CustomAccount with SignerWebAuthnERC7739", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ + // The following functions are overrides required by Solidity.␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC721Holder upgradeable transparent +## Account with SignerWebAuthn with ERC721Holder upgradeable transparent > Snapshot 1 @@ -9365,50 +11191,40 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.5.0␊ pragma solidity ^0.8.27;␊ ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC721Holder {␊ + contract CustomAccountWithSignerWebAuthnERC721Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, ERC721Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor()␊ - EIP712("CustomAccount with SignerMultisigWeightedERC721Holder", "1")␊ - {␊ + constructor() EIP712("CustomAccount with SignerWebAuthnERC721Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC1155Holder upgradeable transparent +## Account with SignerWebAuthn with ERC1155Holder upgradeable transparent > Snapshot 1 @@ -9416,50 +11232,40 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.5.0␊ pragma solidity ^0.8.27;␊ ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC1155Holder {␊ + contract CustomAccountWithSignerWebAuthnERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, ERC1155Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ - constructor()␊ - EIP712("CustomAccount with SignerMultisigWeightedERC1155Holder", "1")␊ - {␊ + constructor() EIP712("CustomAccount with SignerWebAuthnERC1155Holder", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ + // The following functions are overrides required by Solidity.␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC721Holder and ERC1155Holder upgradeable transparent +## Account with SignerWebAuthn with ERC721Holder and ERC1155Holder upgradeable transparent > Snapshot 1 @@ -9467,51 +11273,43 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.5.0␊ pragma solidity ^0.8.27;␊ ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract CustomAccountWithSignerMultisigWeightedERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC721Holder, ERC1155Holder {␊ + contract CustomAccountWithSignerWebAuthnERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, ERC721Holder, ERC1155Holder {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor()␊ - EIP712("CustomAccount with SignerMultisigWeightedERC721HolderERC1155Holder", "1")␊ + EIP712("CustomAccount with SignerWebAuthnERC721HolderERC1155Holder", "1")␊ {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ + // The following functions are overrides required by Solidity.␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC7821 Execution upgradeable transparent +## Account with SignerWebAuthn with ERC7821 Execution upgradeable transparent > Snapshot 1 @@ -9519,57 +11317,49 @@ Generated by [AVA](https://avajs.dev). // Compatible with OpenZeppelin Contracts ^5.5.0␊ pragma solidity ^0.8.27;␊ ␊ + import {AbstractSigner} from "@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol";␊ import {Account} from "@openzeppelin/contracts/account/Account.sol";␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {ERC7821} from "@openzeppelin/contracts/account/extensions/draft-ERC7821.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913WeightedUpgradeable, ERC7821 {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerP256Upgradeable, SignerWebAuthnUpgradeable, ERC7821 {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ }␊ ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ + // The following functions are overrides required by Solidity.␊ ␊ - function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable)␊ returns (bool)␊ {␊ - return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + return super._rawSignatureValidation(hash, signature);␊ }␊ }␊ ` -## Account with SignerMultisigWeighted with ERC7579 upgradeable transparent +## Account with SignerWebAuthn with ERC7579 upgradeable transparent > Snapshot 1 @@ -9583,22 +11373,20 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable, SignerWebAuthnUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -9612,25 +11400,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -9642,14 +11411,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ + // IMPORTANT: Make sure SignerWebAuthnUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerWebAuthnUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -9657,7 +11426,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 with ERC1271 upgradeable transparent +## Account with SignerWebAuthn with ERC7579 with ERC1271 upgradeable transparent > Snapshot 1 @@ -9670,41 +11439,20 @@ Generated by [AVA](https://avajs.dev). import {AccountERC7579Upgradeable} from "@openzeppelin/contracts-upgradeable/account/extensions/draft-AccountERC7579Upgradeable.sol";␊ import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable {␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579Upgradeable, SignerP256Upgradeable, SignerWebAuthnUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ - }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ // The following functions are overrides required by Solidity.␊ @@ -9726,14 +11474,14 @@ Generated by [AVA](https://avajs.dev). return super.isValidSignature(hash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ + // IMPORTANT: Make sure SignerWebAuthnUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerWebAuthnUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -9741,7 +11489,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 with ERC7739 upgradeable transparent +## Account with SignerWebAuthn with ERC7579 with ERC7739 upgradeable transparent > Snapshot 1 @@ -9755,22 +11503,20 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, MultiSignerERC7913WeightedUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Upgradeable, SignerP256Upgradeable, SignerWebAuthnUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579_init();␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -9784,25 +11530,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -9814,14 +11541,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ + // IMPORTANT: Make sure SignerWebAuthnUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerWebAuthnUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ @@ -9829,7 +11556,7 @@ Generated by [AVA](https://avajs.dev). }␊ ` -## Account with SignerMultisigWeighted with ERC7579 hooks upgradeable transparent +## Account with SignerWebAuthn with ERC7579 hooks upgradeable transparent > Snapshot 1 @@ -9844,22 +11571,20 @@ Generated by [AVA](https://avajs.dev). import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC7739} from "@openzeppelin/contracts/utils/cryptography/signers/draft-ERC7739.sol";␊ import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ - import {MultiSignerERC7913Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913Upgradeable.sol";␊ - import {MultiSignerERC7913WeightedUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/MultiSignerERC7913WeightedUpgradeable.sol";␊ import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerP256Upgradeable.sol";␊ + import {SignerWebAuthnUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/signers/SignerWebAuthnUpgradeable.sol";␊ ␊ - contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, MultiSignerERC7913WeightedUpgradeable {␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579HookedUpgradeable, SignerP256Upgradeable, SignerWebAuthnUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow-reachable constructor␊ constructor() EIP712("MyAccount", "1") {␊ _disableInitializers();␊ }␊ ␊ - function initialize(bytes[] memory signers, uint64[] memory weights, uint64 threshold)␊ - public␊ - initializer␊ - {␊ + function initialize(bytes32 qx, bytes32 qy) public initializer {␊ __AccountERC7579Hooked_init();␊ - __MultiSignerERC7913Weighted_init(signers, weights, threshold);␊ + __SignerP256_init(qx, qy);␊ + __SignerWebAuthn_init();␊ }␊ ␊ function isValidSignature(bytes32 hash, bytes calldata signature)␊ @@ -9873,25 +11598,6 @@ Generated by [AVA](https://avajs.dev). bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ return erc7739magic == bytes4(0xffffffff) ? AccountERC7579Upgradeable.isValidSignature(hash, signature) : erc7739magic;␊ }␊ - ␊ - function setSignerWeights(bytes[] memory signers, uint64[] memory weights)␊ - public␊ - onlyEntryPointOrSelf␊ - {␊ - _setSignerWeights(signers, weights);␊ - }␊ - ␊ - function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _addSigners(signers);␊ - }␊ - ␊ - function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ - _removeSigners(signers);␊ - }␊ - ␊ - function setThreshold(uint64 threshold) public onlyEntryPointOrSelf {␊ - _setThreshold(threshold);␊ - }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ @@ -9903,14 +11609,14 @@ Generated by [AVA](https://avajs.dev). return super._validateUserOp(userOp, userOpHash, signature);␊ }␊ ␊ - // IMPORTANT: Make sure MultiSignerERC7913WeightedUpgradeable is more derived than AccountERC7579Upgradeable␊ - // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., MultiSignerERC7913WeightedUpgradeable)␊ + // IMPORTANT: Make sure SignerWebAuthnUpgradeable is more derived than AccountERC7579Upgradeable␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579Upgradeable, ..., SignerWebAuthnUpgradeable)␊ // to ensure the correct order of function resolution.␊ // AccountERC7579Upgradeable returns false for _rawSignatureValidation␊ function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ internal␊ view␊ - override(MultiSignerERC7913Upgradeable, AbstractSigner, AccountERC7579Upgradeable)␊ + override(SignerWebAuthnUpgradeable, AbstractSigner, SignerP256Upgradeable, AccountERC7579Upgradeable)␊ returns (bool)␊ {␊ return super._rawSignatureValidation(hash, signature);␊ diff --git a/packages/core/solidity/src/account.test.ts.snap b/packages/core/solidity/src/account.test.ts.snap index 67e081549ab44b4d61310c7f65e31c20ba6b1fc2..c3a0f6d55ed0f07108cdf1faffd8a93ba988daec 100644 GIT binary patch literal 13330 zcmYkiQ;=rc*0r0qZR1Vbwr$%+rEQy)wkmDgw#`bb(m1u&{=a?pd?I>`c{3yC&1k)~ z-i6eKh*a#299=9OT#4LRU_gObGZMD2=BL*mYzdx=N2Cg#>Ar@@8XtiM{np!KsoeSq zqoIKQeL%1Dyc6)Xv<#A`re|L|L1@gr^?_WxY4g-QMrYjm@4V4=WBmqi5_La)%p@=^Pw7 ze2rC^Z#DHLnRE}5wZ7{Mt#F^piiH`na3R-~>j&qFI-J+EYKTC3f0(|?A!HP3I) z&osk7q>6XivEr7xm72NH`8ICO>-*YXuWij&w3Ha^EH}$nt*=?TJ~wF)=IH#?;q|k& zuB_j**V4OsyQLGTvD2y6yGrZSu^aTU_2_<;JN0^a+sm6q{C?FfTkbke@lH%#Za##K z?y`C8h&8wHTimd5*GZ@A?r!7|@G!cyKApuA@Y{?;reC$vWrwd~={5VkxlKBF0awd^ z+@;L3c;TwkIpeT=W;yuHRRzB@^NZc5#LZWFk=3rz%&kM+p>eap90BordW!Cdx^>FB zm3GTnv-9gk^_zT?&!utGGIK*rrnh6K&Gvjd*Q`s|fxX4`{lPPI1UGzrW&U)tZ z+qc5zQkI;zo+bV%c=$VJ<2UP6jZvo8;%Br3?ugp+cM|~{ZB@Nlo4*nE-;cO8Wy(~m zyEvv^T>Cd^D1A@c#CJGI+O*Jfu!GjFw)`<4n6 zFRn}45$@{-ezH5MV^q_0U!-DX-U?0ub&4%!AE9o*31j06CMJO;TPvJQfW^re!V9pO zC&fGdo=;?#jhl`JoQvOW)IR(N1B16iyA82<@brROvSlY%ZRKjNH!$||m&YyuGE(q8(49uofn-TL`f4b`@0ml&A?^C?Kr&$NW*V>+@ zF+LP${yL{>n~WUs$wz}9R*8Is+?|w;id+};$!*go`qW+m*ej*JnaBF>WoB#yEG-a| zHD=RiIy!0d*tVqJ@jN=Vt<7ePI#Z4q7u{YOvldzK&vScMmhL+h@Vk34MsC&J&FX`f zGkE;Jx=+}&%U0QcwP(bi_!Rd`6x?*LoXU;H!De&F$s#qq-Z-hvkBkbB#<>`gIFl|; z0%9y}-cHa>Y>G@YPdCDr4HTdex*#=L6g(YzuUZa^25>%^Mdqqk89Sp#uj`)eYprzG zY;db|8WAwyzSGtt;Tz{m#?ZhM;m&v$Y&1t=zU|qcviaO^MuKTD8M=(^jt?f&33a>O zUkBPB*q??z2UEi}W^8pi-Tfk%p7NsM8yA%ygdof{&V(`TNh+n>bx8-rb&( z=X#E}o~&8&al3BDw*)t?`~nZG!Jdy!)Da_(!tPw8&b}C4az5{&9FRS zE!)=YIvThqX70aTS+|+D^4bo6J<(k)}B9I&yO2;n8!13xu~& zy#jPD{%qtV1cBt-K6#>{q4hacnHO!&WyOwO5{9|Qw=8$GaCD)18toP0;@Vu`?%d=Y zH3X*LcUF$QXT%yU^rePR`uX|kcX~Ja&nH)p;u)=TEwJ#swK$2k_U}iSon`TSV!m=} zH0_Mh1>c_8Rn6Dep7i_}JfBkSg&?}^cP$e&ekp2eCMIZ%PqI&?m=HiSq!T5fg~0$Oz2q zF(4iM&}_F3YR@cs?>HV1ou1%2Ox&=z2;O%kB(FQRx6AD}J$ zl&cDX_~~0dkT2T6MJ zhc%Ic(3b>GVp3Y=pB$d9nFZw`(&+eCWBCaWr`&9c16W$l0y zz1KpU`eP?l>#lZIMo3eSpah;Q7&FD!7Lo#q4+;dc}(Cky#AS`cztGm3z?+y+v5(ux(EKVZ96*Y~P@a=1IU~Q-6MLkKW)YxT6$2?=^NDqo1 z=z@I)mp!?s3vtRkSHVO=chwH3qHzg(yD!sRaYLkhm6c#!QLL>QCfjop+73BHI%G1m z5D+3uP7JwA8AA3irpF=0I-$d*l0WFSFPnZ$rUhL(c1T2qbj9quR!WsTW-3H@P&-U5 z(sCG4xxEvtDYV@913G=leX(-+5v2-GM9gvY;EdrnhY+xocgoxa2BOa7$z;YO)L0G)iL6g@4i#CTCdZU)pdJfkRHMM?n3B?fFo}dnR>2}YAY|1Q zAOsKv4CvxQ^B^GyXa6CbPDzUuj{z}SP9q|fDS21UbP7xu1E~SXNUgli*iUGTMwC#{ zROm0M3=Jm{W7;>#YZIB?tLfoNVCIvLjqEgaPu;0dzw*|~D*KeBBwzf>(A;nJ$b0IZ z3dG$O@iL;4Oeba z3|n0*v|oPS2)Zov|*sPTez;I^M@rTeCgjz1AWn`YB`AA058z6ecDX*LbAzDLLq2~cg>Yvj>G9k_IhY~=7;rdEmmi8dh0$KU@4m$ z-_S)a9%+Lwzr*wjOtCl8jMxa+TAHro>>+mAT&hP5MOdfs2d!OyxGc`GyFZ3iOtYTE za7~Mqw6}8+6100e+uO$p&KjL|Y^RxLd~%o@_%)hojhJiLXtjV_+j$Grn7L|C=eB;F zo`OC*_OAH_gtlxq6cYG>tIHKw;j@S)DUV=kvM`a@w;6)vJ=Z5)5->@nT^76y*+lYt z7pGL*&sn_k?$qXcMOm*-Hs}LoYy3Hx$>!k}y2*d;`mOg%7;=!0{vK5EHL= z?*)96Vb0?GjKz;FtF||jVTxZmWE~aByacwfu4VdPDGJFK7IwT%7D5pIFUnk;gjA60 z*tgyKov6&UN9hq@K9DD=>pa4;CW{U0Az1SVKc_2AE7;qVCo_;RZjwc^2C`IyUWbI>Xkl z1~Y(wz5gRJg$w@?86u0vy3#RyAO4rv?tp;Z=a>o@za$BhRg9lL`yd~4*C+*2_H`BR z#zD$`lS3jBgSVCsDOP8X4Qxf}eFo9|zJ85U@D$JxoeyH{^i5BCw!5SSWSAb#OrTA0-Ir+A)x@ zZkmbELD@_208X5U+0uzOWWf^!B-1aV1Z*RLzK_CGclsAXbQ@JL+%`bE5hIEwNfP$zj@&YSixppiF1+Z|S?@R#&eQgLocqd)2RDtTyiEa#MDQ z8d*K&tt~dIbSfK!oCmrGZi|mLnmN(K_tP1Csdqu(f#6irLAP0LKAxo@ zJBKVo-ac46BEUDu7@nCo-bUBJ9AF$|(YVGKl)T6nkq`zb*~tGzX*pZTl@b*9YO~q3 zadCxibCWUG^1Cd8@@>w~b)2elVlsIq6#S0FodclBC)&p1d1*(>h{q`wV5Gi|BtC9) zZMxfn9kQfepe-kSno$Q-(I&e=mOqpdJ5-g*fTHLHV-0Ri&apNL=tK9c*1aNO)Zk>L zXVdS?rqFa!)dCJ)TGB33wBIisV@4OD^dq(vHPqwftw!?b0KE+nRboS?p50S8@_`9j z3Y{`$KUBJy1Z(DpT@v1)xK#{Olr=Rh6`gxu6jdAvI$3jpvfK$FlO|J|2(xMj6Ibsz zf_qI^KN6wv(ngB0h#B7gO&-)4UZ!+I=il8bjTd}=UKl~)Bx6}p0g0bq?n2)?gKahf zU=h!BA_1<^&b*UR7RMZ!co?ThJgxm1!kcc8E2A$5eV0vbSqGE)b3MW&0(a<*cm*-3 z<~oU9%a>hV7d^$5(<#()D3V5A*XbY%RU-ps%w^2wRi$-(tkXm9ORaEH08y_dfL`Jr zKRd`vUWhZlM%)kB)726F|7dRuD>AAv`f>GgR}?)c$k}N2HVk5e`~+Uf^i&{4?w=^_ zSAq6Sw2FMKflH5s2q@&?4f}rdiaCk0N5Jh`OEvxq_2xC-PpTyOdixY<@DnJye4DNr z5D!~Ejz)~0fhDbiCDsOZ#9Sx!jhx;kjZfrr7F*{7iBaf+&0(z~$>+!79nSfUtUGP5 z3hXcSjjFZaA4y*AY92tFHB8t+)@C9+m@2+2Aj^-^s=^G&>aqm-qJN`U7c&^8SLTb6 zOo|nKU`Vx%y^mXxE0K6ElxH+GOV*FehV1Tbrwy z#|b4ZS~UN__0=*hT8zN_+WF#L-y|H|QD@&M$*7hfsHfPF)z6JOV^J_oAe$vZ=C-ZR z!*MP!x)%e(=^?y|g|@aA-`RX*h6&dFDxq*D!vE|~$`-x@u8j$TR+U22CJ$VQm>b60 z(pXp)@t7s>G(*Z<;-3o&@1Jh0by2Kp>qkz%V}l>YVBVsk?oHyu%WV^ETAKiC(p=Z3 z?Ht`gSCdwnKHo=ymR0|g00Nx^Ex18+MJuWEOB);#u#m`(peUUV&MDXr41=I(O~g|$ zoIjjo!<0C|XaLD&5Yn9$QI{78MWYuI`X|lYwXA=b=nW0kH#iS|0rCG)o4epZEc%vn z#nu@sf7oD&$rx6ePNe-Nu;6HvBjEBeG+;+%Kcp|)^s%Z(Q$G>h?H4h3=Fm#$m)c@; z+48H~$Wq!uz0v6*ZnOD1&dk+Kd%7CTtaqmKA^my7f9;v&aEIQJQ2g+(xenHFBiX6X zdRSo2@}{x>z0YN{ZE61wYT%>ctdH{rH_q&)6OV(vovKg!HG*H{-T%sMp0O+R79R*rsig<(Q6JfZ}nL1p2N#H3HhIJ>m!$mCqGuGf{#W^5fmI&~~_}Hff668(= z8-!$TWtg@*Y|z4A)cu`chdLg0nqX1%241* zM95+55C?dUVgaGnQ%wlo0idaQ=e5}-A0E_!))qjX_=E#;7{AOftHFx=L9nWAKjh|- zs5Q?pLL>LBIExMq>WB~=DM+)yrTr5uhNf9iyurxPELr*F`o45j0N@OrXu9MZ)M19s zv|tL`nduKj?YaOsvpoQ4JRNBG+PKGcGx~Nd)WwCV zSZ(q%QoS$k8@&wXW@YM48X&Z&v5JfqBFr(+QAxUuC;<)!9*0gLmO?!_9#rW!D-MDv zxpE*U(r_REL3E#Hk7nr>9cdG3vtqbK@lZ4gtmF48a;lx2h*^4dL!uz0+U#Uua7*~V zxL-rrA^wGM7OuhOUCeJFUtz-LZ$mM7{^}Hb_L?4FWI^Vy)?v-w0pGpuG4*BS@ocG6 zZR0)2lZfeDavk=3;bMRA>@$v5cS8{P+*n`VLjQ#@HVW6}nldJOFE>4McDxqPS_Qrn z#j|VkkLUfSmv13(>FJ(H%w3;vjV0}v&XAxL+1>ixJ4V@nJ@3ouv{slm+KPk!j&NPp z{6}Qz(CT?NhUgJgd80E8y{{!2bDiO_@N;(1RbWXM+n2jzahO?m)!sYKN>^{&jw4oY z@bXDYQc%UyANigD-{90~1$v)I8ubfS_8u5JdQi zABgO|2n(6g&A>uEAejLM2Ryb?y2!?Au;I0f+bQ+-dVD_t4AsL1Ep>YZmHB}3@d!Z5 z+56kR#448nkcQ%*R1JH^X&cc$@(h+U!0*XNDCvi4C-4R_uW{`bz;+b~eCY3zcRi8( zl>G!E5%k--U$k(O*1I}7xyqgXp_ww*vB|)5P+?DKPw428D2NK!qqHO+vY&;n4Uczm zfQ9b=m7r*ZYmqj~c3svFvX5e2KV^VH9|vuO16kgaxG|Z*11px)Ypm%SSf~sks}LpTd)HLJ0`nE@O0>Zncg`War>@!Y3xX|ciZSN!&MvEi{lfAyG~^y z1L-p^Y0xB>Z68pqB0ej)(#MDYz5lvRI-L>~{>PuP?yGfTfE#A95q$fSLU6gZQYY30 zZ=MAQ&Zm+sk1;jn&gULtfYN*79@;i2C?@sFwYZ_NoCyw^D39PsLp)CmE&lOaB;kuN z@Da+Q1}yxDkE`5OyFZ`EQHFhsWGNk;Nr5O$cf^6{=-z<{Gv=ZKsuzt>t;{y89|>Pk zRvqm@F^$Fcfa|mj>XbJQ*$K-Gl>M)Hhl7|3_^zDsXOQCBCC|O@5eD424f8Vgwx`_i2;{HImdhz%25H?vD$6Lm0mC6PsaNUn`5@sizOPo|e*5&%ws` zq#;5$3p&xatN$z(ThfcUQ2ms-Sk?7n|I|&;tY!0syweuogs&y8 zyBk?TrckF)o0|*fiR5WW3OcG)O`bqU=V>XS`#5)5J^)&GawSZlR^qTZ-iRfhry}fW!7R$ z97m}a^DtyS194T_&<(`W>7T*eyB~cC4iUH(9b-O$DW8>{@BjWy7yFn!jQ9cRAJ{9M z1>1LznS4SI+bx_;1y#vJ?0$Go`+*s3|`(Z*9rJ1bfUL!3ej&wBCnDnH)3MxWTY=(fYwC>dJ-vZXC+it z3Wyc(UxQGO|j>%&tvf%hMnrE}9uu}sPHo&93V zv!8{J0X*X{BxE|s!rB85im3ni?k5kh%^{&TBHsl5kyvtk4vIuhY4tkmR_F)vdAVB3 zq;hvul7J!70C83DAWyz|Zb9-_jRZv+;e4@gq6XMeyoHeB<>JIF$-?u)i3-)X62z1W zhGL2JoyyFN<&e5kkinlHoPk>uYxxt|z6k9l6#Ys)cE5zfQVhVMhNND<+Fb@!$CX3u zIf+%KII_%kQog+v*}S5BGViEV@2Xfw1uN4_aNkB--^2OEFTdUq`mZM)o>Qam0M)Y=Z%F_R$KyQeLp56S?f6=1dXH2N^Jz4A<^TTOij?;qQ#N=ydGjzR?tJpD zpW(fC1Wbv@>4|lG6u2(U=?^&nFuGknL<1>9;tcJh0+T29p!xsLNv^q#!AYI}5xP85 z##6+@TGCU*70v+<>cfCz$83}swh=TFvOUX$HDzhr_#FaCHc`&p;~pu^>x+qoY-c&i zC}+hdQvZ3bWYSc_0R~I-rk}vo%*(&;n%)qEs{~4Ds|R@1BibIY!)f$-xJ!3~zWe-r zzId|yUTkThPO?C)8HQ(Gt*jPHql6SMsgREmKF~`T(dyk5cK(| zPgzuR{=wiBS7W~)hGME?SkuVxWr#EPIt))6S-hJ?;r8P@!)lZfdZdoWN|ggKECd_@ z9rZ~%@A-&>@*Sf0-5`VC;wl1VTvT8PVKVul>J<@*A{C-t`DCu7#SQK9pDFZlrf<&$XC;|yDOu9UEP*GZ7VD?0gpnT1f3?F zinF$ve%RAEx4sUP5FfGc34V#a;E#T#XdJinBtO@d3@`~yLp+dndpl>afGu|UoTov* zC7w`1NY_{YoD!`2cYQOP7_7GM{P@P{<+F}WZuoJnyxW^c`{!HHt-?ZMK<_~KF}4zh zik!fVIP4d>I|h?DJ-A13XW3hByaJ&@0^c8YvuCt35!Y327wZYrM0B@=7(izB9=#8T zdde(dmZZwxOF+GM;x(82hUPl}CUF{_+l?f>8iQR(*tIw3D2jujJ-K(EwPD|WBus^m zx7QS0TG%?210R(=YqSP-HVS>)jRC!ki=8j47jakYX+NtTG4UteDMEZ)vAlf!@RhHh zc@qF(Yj_wKCu?%|?OUehOTg%Y1~)zHd4}u<(!u7mOcuVG4R|yfn48RAJ?K4K`|Hn- zMbh_nUQ8JZ1Npk6FDcdUNR97UIEcSdL6I?nm~N5~>1PEqx0Xz7f>{bvfm_AgMu{u9 zOf!{yVi`#&|Ne1mj;XQ@GcDuYb+#{hBuNRWA2_Z7rLwKlSVMxW%oCdL!4J_!t&$j- zK=a8mf_&#FYU)RdcNkDd{pH}K30Vn{?%*Ajg-%TmL9B6qy;JxK@&X3nJkMA1G6M>jS7lw9e7|dqpN8pn+xz-g#@s0gX>J#a`OXLGwF(GL z)M2;yXEkXP{hnhA8-xj@5LnE7JT=HJCcG(w=PCYYiFuG*kY@yI()l~TV+@mEymt{p|w?IDWNAZDcmWO-RI zm4kIp8D>H4zdC_*--O?W+^WKD<+w&yo+ zX_3F*WsplI?-SHY9mb?IVu|c)#;r#eIKVezd{%Q%Pib~hdd3j!2Fdct(vF>@(MEh= zh~6jpV1;bK39ACK$!79#Ab>z>CP3tquq5JQ0Q~dF4d@NcKI_zL2f@iM;AS-PGsH1Y z&T+{u|Hi>1Rc<4&7+@I1c(4OkNB1Q;Fdp%e&ReOetm4q;QD-{1MHw9Dbqv=g`IS zkF?%<9rB+-IX{?mlbg7jFfN1j6;*lD_3vVWOwjO(_BaDUG=A-Qu<1n@{o>8rBESDw zPEI(zpL7|Yq$bXlh{yY-JZ(;KfOP-?><{%4TwK*yETdi;i>d)mjxVok!+`T|5}e(3 zFoa$Tc8_du8m znjtD1{5Rzh5|d$Z?ePBQqme_B5*k6=F1}@rE1xHipv#I@s?M@L0^!b;$T8|XQOk`~ z&UD(lmF}$cKFSn}#9@J0Q|^*r*oiImuQAHNZuFlQDW~$V#T=0it*E@ePfDfD zHmBDdD#IyLD+HvZ!_RU}1~{CzT=$)DggdXv2gpXlK<--iJIC04SXzh&0?4-Z<`a1% zp<8aNXBC!_g93Rx83lvwUURL#WJ(rS19)JCFdDgL3Zg2jAol0&R7DSHq{>TN^tB&}$UWg*@`zr2Jopgn_Za>t6K7n% z6I`5$BOYoG)+A<`qOGE>aa61Z`{rpXgeU`k+xy7KM#oF+csNWK ztC4}%z+Ld8$dq+pRywoz#)aK1zyoliR6G|j@Nh91Y*^648L;f_d#CZbNTZptSKsVk{@*v7(C*YXi_>+7T_b+^m49xMgl{ z*C(WvLV|#-8pX8z$E2j&O19Tg0v(6|;83(-eSa;SF&L3YqTp?HfZ?)>alpVjzIg&5 z=8^GIPk{o@T$lxD$XM`W0c~6eWb6Y?=!7zGDgpuI1hcHmrSH2up_pVXfGR~AzX~i3 z$vCnz30&qb(&&Ri7>*+*7)wl$*6>OP_6zkHF zrOLQ%sZr*JY1_Qb0yF8Iq8Q9L^R#O54IC-DuN()ptg5a&Ud|{7kqRO*=zSj=T*L>2 z=)JYiT5$HIkSbI*UQfR8J>h-z#Jyb7nRr|rfOitr%xDXJmR1yV2^hoi1ERfVTx}rbT8EO zR(NV4g!F)`uwMhh0PMf0!W*D1_xC}(yZvV~#f?3Nbc4`Q^nISVtek>Df)f*EFnVd* zvf`Y0prW{-wZ6}Bj}Fdw(NRUN?y-Tn|j>?vBPS<=y`F z1k1ym&KbVC=u5Tw-A`Lbe_e~CVo<7h-3QH!#BMM>r}x=Mw9N&t zb#(ngG1SBgdzS$7DR?^t3+n|cfGMcNn&Y_(YWS`86Ax-#n?QeuDkR-LAJL#QmptDS zv&p7Ezrxs0!ESFYuaOgmB7B7ABy27aO03V-lhHSQ?spL8^3dq-A3=-HAZ1l(2N31* zzM{gy%i<%}6nu0HbqER~pxWs{E2l}3*6ifTh`WKVvVHEUd$>6I`oX0%gMD4fJW<^UMz&VLtz$+Y&H6A<`o5?wEncG;bDJInFrxh-`w-($Ws*4f#16 zWy@M<99dyZ6UXq06}1C~fRjJToar*lqQcw~*_{@P`vXi` zYLBrT$mpJfv5JXiRb!XbwFP(L3m!^$L9eS$!J$wk_2#WhM=RTc*I4 zc^j65_1tou;iy57ohnya(%qq{>BxiW00$mBpRTN|K?X0fIhKgt zkv%f9A7QT$jd1yQ{%+`vmPwuErm(CM!9R8_gN0t~ZQfX&bR^35TaMgylH4x_VbykE z#o&7qcEOg1E(EL8wW_3~Z~Yz-Cv-I$Ca{ENXQM&Kvz z@E3fKc!uEr&CmwJmpTEB|yVI0}ZB)7RaA+ z%vz!;p7WwKP%aRo6r*OW%BknreBT()cn)=`Pvzz>H6bN(7xG0DGPesVTsx(r42P$j z-~gKos~RodX?sz~2mx?|Lvj^T>Ja>8PR$ugsSb~~6oJ!*z3&23Oj2Gfl^~?ZV3cGe zu1i-8L$aR$LFA7E^z&{$Cf@u*o8vG~PN0BdB~n(8NZ!;8Mqbp9lEibA+$V^ZpE%u< zSyeo)_1M{XxF$3a~{-L z)pL*eOd)k4VikKMM;A*6S7LV-IB<|7oRsDg=@QsFJN2e+_ZcJjX+PU5CZkdn#$r<_ z-zXxY7#NWM9N-svHn9X2UP$_DIeI)0VML~N^BNWx|^+jTe)B7L_>G--@GiYBj2k#-mAyXt2_Qyr>+J4?q$EFj8DNcHXpi+ z+i|R=r8U3K(&N+gMaBDO|AMVn!!krUzOA`zJ-rK8jzArV&OW3fv9hmA|;hcKcRCMfIPwZrcq!5U7)|Sw0xL2%LJ~XFs;OA;( zW(hd^I@h-@SmE&ni#OHEnIvSy$e6BE#wKgoR5!TGS1i;juhFf3V7mBc^y%E zkfVJ)e7Ml4=I7?}92GY(xMEvtbDmOUsQP-fb&Z4NV|kUi2wQ-Fn}2($8}cM=j+$Eoez}X}JAsP`wth=?)+0dp;u)T|Mi%#$ zeM@D9uG`0~u2@Kf2BABlq*W6G>ylrM2Kyg%4IcidiytWo@~dZWm=6{lnn5xa@>7#U zStbmRbsEVBAG=Ii8Lzk3bPd(aPjl>l+^TqNy2<>RR*6bHlvee#>PY0I#f$Z?r>M&*2G3x zoVNf>2!7atNZBeslSS1dhp0wVV!n=#h3bSelmQ0Mk-vRBxB9GBg_}EGPas4E8YHD# z)F*(vikRv(EOnKgG%V7Fb6j_IoG&{s3d;t{&8wwQt)FWw&>q^ujkLA)N3@1qnxnba zh|a7O?)XQqD_L|6Ao4tdkq>{j;Hw3jzAKdiPWx$f3SW7$Zj^hII(_?~jv5pY{f31e zgK4s4ih9-YP3|pXt6g7{5xplk?3v5#q`rBRNH+%Og9kbBy4#4dPoSIgR^QJkua(@i z+vvhsVZME``Lgr0&(|^F_z(NA_(5ZX>~8R6tEwxn)li#P)}X&bgB@#)C8EtrQyg{E zEMsFernq_R8cFkly=4%}{Q01F>8i>dY=aSkR>F^5&O!ttN9lQ=p$F;q^2eVKR~m#~ zq9+eL*-Yqni{~w-otQ7@O`8tfzM&@FR=&9flM3$R(d>j+UlXwCNkOsSLVjkL@Rf zGYB=gTiqY-vq*+A1&*@4TS}X?OQ9HYiX6uLS*GSAOjJmYz*O#IoVx1XNi;FN4H?}|1tV6btk$9W`z)!lNPrj@+?&g6~smS?(IK8Gd7vgu=>hEp$hPaHW zikw-6ARB$gK8layg`8=(%-}9!PP!fGyR1SCE_%7W7tPt|D417s0HikHwXYltr{c_HK{sd^~+>EElx zttZCDdPIA?m$rcX=a#r0nYa#N4FM%%)v(dEd|)^) z0h@EWXE<-kUh?Uw(C(*XW9mwIW^8zcu(I|d*}Jpt=*Y>bYm3w!)J*L~rE~Jgvym7K zmUjJsgMoq3<23Hwu%xOpNqY$BZ<83dG}t8EjOv*2m~CoGTVQ*9m3P+Kl3CGH+voae zlKIEuV5dI+`*$^a10vmf&DUtUZ|%@8-WnS-NM#h9_>8P>elFKQG$?!VDDsZY>EXh>XIQoH7E%yJ4a$EhC)%G)WwMZjW+=aGGd7xM98;o*6Yb7smXa= zFL!;*Q8Fka*|v+aa%qL3zw)d@L2?}mTDc8XKY!8}r2Q$cct#Yct^AOu3WeP1SGHat z>0>q)IwF`u>!^&K>#HWqLJzIzp8|3q08V9gF;oSoJ}2KtW_Z$7uiA)UB>|xe2cA(Q zKPNajG_41K@#iPDdv7v*g2mJ+ik1tTQ@YqPrqbPR*?!`~>v34Up8{R^6eoTi541gL z+cXnXRc1vLt%rounwv2;xkL8X5^7|YXl?BR{rhL*Nhx9Yq~*?aXH%V?Yn4QXDblV#EhD~ z*G7i6vb1OdB^pb4MyBML{8~@!xf(%hB8WW9t8$=$*Mg4u!K{`6oFK>#=NRF9+|U5( zm3gL|2}pO*C0kIvY_i>-Zk;ksqI~h1XkA{cof#q9HI4QgdVqAmWMD2ZRF<5iY8qV_ z?LX8z3(uAJ!L>>LMNqqPSM5&??%i=kMu+tR?LRS1kv`$eH@s2Z%q+F~*{^K-bcs*8 z^D1K1uQAhqeeW*`_8qVPqs&|rjq@fZ1Iz)aIhTPYLkv0R4cUuZc5jF@B?Ier7?p5L zloI(t0mQAE6ni@EVV6Kafc*n5_M3hnWMmp9(ifT->@K^H*W8er6ecwne_@u~|8*BN zm`;arD7Y?$>XZ`jiMd<_6KU5%=ExHj(LjXC`O46PBdfrCPmxrx4X#es)BucH3wYoO z8Ynty%7FD|uSvt?8!R(Vh3z*hCzz-b5CyXYl%*r9`6ekQ(D0WStNBtD(N;!YS~6$E zYO*!Fiil2jIB@(ym|%APgNyHX43-8Il8G%Q?}2no99a+o=7FXxq>$uG@Eg#@i}52P ziSsA;5OYvsE5H-^l-pGR%{Ug zRjUFVO^4g-=yZ1`TF~K4e-R0;lHdvmc1FizimAyA3p@Rox{H)oF#uTH+&Z`O&Jb_F z6ZzN_=)g6!&f%!Ca0K{S;@BE0AxUj`r5)w}?9d=1jYpE8cXDPQ(LFI)N=*CUv(oT( zFLgSo7EvGy7!lGga>H&;#wW$U-+q-0Ay5Jb9XyPGOo{X^ZA685os|L$)^Z|4x!b9W$200Lz4A9t@51Z3=x-IG;_=?zI8i$c!>|~AhQ#mn z$@adbA$`n9PfouKj?4MuZ$$t<1TLc;T$uoCh4<`g8;{!$P1)*#tbgSuEgw|<^i&o(7JgRCvRO3Z3<{NGW#J$baxrnS zu!s~`bo*`S>&)KwhGbp?@XMr_wtTQalv|Xrg>3uXbbop=+o%i$zuUO(K zMHqCcsg&sqV5fU#o=+dJ`3v&-FYN;<%`L^?2j71S@#}%0kG{he1%+NSoRO%Pm##4t61TE zpR_f4U;<9$1vAp>Wrj7`ng3IQP`-pi=!`Z5KlFbTJ3F!~BSBg8JidOnAL&RI0HR%Y zW@-Q{!eWlrh-PIY6jnsrk1MOHDsQ*4JD9d)&^?k}+Q&k>ldJ|GLBbHNqEF=&9Juy0 z!qUIpc@Lp#WmFVWLExM{DZ|9pgE91`leWVl~^NLEqx zUe#RC#=~+JN4AMRAG8SBsx~0sevD~1g%s$msqDrY+>N{iaqo^w3t84(@YgMR9wa*#pgqzD1dMpQlY(P_m5*7!Y$c|k6 zcQv^xl_;U5^z0poh!h zF3u1tyzX$!UIJ1=msz54Kz}%(CpkY_C_Z{9)ejCOX7EvT5SZUI@SH-jI5@aP5CP&N z>LcnTrnD9g$nI0*sa4Bd5sX7qT<%kKF7e-8$n=|}I}(G5A*tygjX0dV-ekF)6D*`I zZnvM33{!-WMgp5y{9c{?);IqMM1z;Op@oydV~eK5FM+5@dAb1cop_ zm(2*L??UOlY;LHm6K2f@$}$`ZDLLphM*&(QxFXr1{R{*xu_#b4P)+{CZd!aOrZrNZ<~sSQux5? z4K`mvK9M^oYto$8+AphM(IQCOaSehn+Ataxc_J0Y+XEMVOmk-44IFgxY)2H9QhJt= z4$wa$osrv1#Ecg(B3cUR?=z&izR@7)=O+cig47f|?{x1qV^RP?-hK3Bd_m zM_~CyXl_Aoj=W-eD83>z8HuMFC2rYiFrL<3w{9=G7~&THR@ZmwqToQUgZ`6d_8>ok zK0`30{~0MO*f$HTMMy917V>G9#71y2uo6@YygppFK0L%otN(T^i4^)MBHYni=P^3W zFuJy1Bd!iyj^;T=^;WLrH*_nKNB62@&~HK1jUA@9`3k0N+BU8U?>f@K4){mOi9T{Q zvGc#LkEZYZv==Xv)qUcj3kP+`F%R&h74Q_={EkOaNkIeV!y}kzq=1q*R72lgs>Y4V z=s@r88w{795dmyG>X7H;?{@XY-QnbPO%{Pvy}N9ByRn&yE+w;jl-mgd=c)JO6ic{) z1Y%p1O81DON$2LG!4PPFyCu=2KrLdDM5qUbhVf)-WJD!}uJFwr<2sWdH1K|wTu-3# z+Ww%k6$gsM2fCwGDRDBd+700y$M6Qp)9EkQy?ddp5lPs}*jy;f9w(75iuUfmlwaq0 z^@WhNLc=bZ$9P$fgoa0HpjtkeHF8jtwc>C!pO}$BwZ6&74G40-gpsd=8H4NNK%$o= zQ#DG1m7o^J%o1tzEr|TKNT_6vl(iDCLjpte_a`*EargBPhsmy!C9R1(QoG=-!NM63aQ7q#T zZ5pW^3f@NAAKjTaD!G$`3Q3vXEsac&FWYh2n|ZsuTA>fPl)#i96JgU^5xfs*^)HVF zsKsD@nk9p3$qy!XY!jP%6T*{A>A6&!@l1m{$<@+f5bJlSjtiDr^m0KI)-JBW^vxAa z6=m=a_WOwKOSkjuR2!2DiJZRByC@rz#^O)Ma+5;Qbo37^a#J0gjJ6M}{6L{JmBJ%N;H{aF7GY>J}TeO{U{w?aaYCvp!p@L#l62o?HC4wLBVJQL>{vSiq16fb$ z_6b1Mmv?y%DtHh7$dSIs3(+X^k6m*uhlgzI3a`O8W6j57?2GZWex4+N_!#bVs?*S5 zCpCEf>W%K2$LE)7s(tXJv>f=RnSP%dm&=q~ zmd}Co$ek9R($%oS{)DM=&xQZ(-U2W?ushT^ zzt=9Y)MoSlP>UexQ(?ldK(os4u|{BhrwDvvwrZk65C&<=5~*6cCZpS&R_vXeCt%S~wem0-2R5omg<}g?JTa`*J z7tW-gGK4d&L1By>2k_%swc-u1-y&ACKny}NNRiu48L!_OdhIf^=_Dc2_65klosQR$ z9L4Xmd!J*N-hw6ve^UTLq6$Ewc90Rl3fsd9r&8wkVoD*OB!z_dCLUKe(|$x1w3+iz zaI5n+=8$Cx<+eEJC^vUFqg{*aEu?g#>pjQ<7q8?P8@vYrr&}Mqci>79{*@n$V@B>c zWCinL7^Wc^DndO8H=Jvw*>bWXO(OBI-+H%^ldGqa>9w-h-F3-RU6-AzIxPqOjSmDG zWaNoQiAQKp4$zZVyKc_{sCpkuGY4qL&Ys&ODv5L|+fBbJjJiN9xJ?m9a1+^xzj8#P z*CHc9GFz^e9{x+;iQNV*X7F=w{A1$Vb`{S|adNk?TUQCjl1Fv#+Ani@H~<##m3u;< z9d|}k-O>=*EmfpR4M3%smfUMR0LsPYP##3P=xqNg&Cas?> zrPhf+vU`bzMx@Fj_xO(r(Q3)=_J=z%}&C2`cX&>DYM zv9u0SVBFewkCGu5+dSUTmP2pR>YpBavgEDzf|>irY@P>Dbqc%Wy~MMpJEH{F0k?ob`-b12iw1)^l29VQ?rIGhpM9C;9{%X|bmW`euVEa9Y5saY7 z3iS9`URxV^H!-%vPnf7tWXe{eGPc6=6~Mx!h>L@N`K=Mtqjzp{U6Q}j%4J1K$O!YP zqN1;|4+9+?t%GhR zFO{wgigOtSPXENND62t_JLMtC_Rb3&9OOZKF=s?7-i9_y9C*ZiqXAdpg=%O5e_#2+ zifTRW&C|w4I=L%E!`Kk-4TIyV3-VHwzm0Xjn%HgqPK!1tdB4BgUaz^KgLY>~^H`}} z`do@z&5$8~RgC~4;4$Lzr^NA;0?P3_u`8u(sqD5rkG86azp@5Gl;xLX zni5WNUd-VuyJm0ij2EXBF+zgQna4Ehr=+Ah%Ct8?f*Is1!J%X#2PNFB4LAy3^9F6> zeL3dqz?WmLO%SVNpBOE7=1G37&Q5}$+=1TMsBl6%5#O;uWaUFK_jAK!8sy$ifqwpw zO^!AU5iC@-)*-Kj0LZLoPiRKVA+*;}4meKQql8pWDfe8E{pMTUFR}b@-H141bt*@J z2wTtyUC0oW?dL6Fg-2d_tA7;lV_;a1Nr(MNhn1ydpw^)-asdk+W4rGdxYOUEO83`H zGC>S0hw76R5sPI{n=r>sFP94s(oadp35uXmmc+993G`!*RlR537-3X$Vybf^xXv0c%j}FS?`M}5g-VeY~>Z6Zp2$> zX2}tg;@+8wnj9ylsHS9)=EB$Qgq_(ps=A@>cq-4YX&Nqj;em#S%;A1%q#dRG^3Ue7 zD&w?lLoJiOz8|~zR?kM%imYfg8eO7>CoD6xGqhYF1{4ofjy7@y`k4(8B9qE{r1YQ-JXkjj`oW4<3YVNu*L(=op-JKJAFa`KP%BQHYaK+~p|GonjCdu!kBc?2b zO&`0g z`6%N6hNADHuuzYX1so_S1sFB$w-4aAvx&>a~?UbBjIiiR@~O0seO2rIm4=Q`CcVb zj-*jKuFfxT>IC8uI796tjNl})5L=8eT4chH;>iEi=`?TgGCGDSZE>s7FRR^2k)?6F zCfC}^c!riZLMr*KbZy)*X)~qm1WGD;4p}3hJE~934%4&cIfEtHZ;_)eyWM$UUeaP^ zxiRTpkyJ1|;m_?LkoAo2n@4@*-u0^cw}Pr^wpM>7&eK?8Ic%lU8#C`n`az~YET_<} ziD;3zjkZ(sEv{Yrs`A}Q7P1R^lP9_2Hv@9;tS~-y5;GG!g^h8TF*4hLffdanfR%pc@JLjusu zWA^uygq+F^!F>`&l^@bJqXj-c#K?4~C7?J(lqkl1upB}TI-($a`2CPg;%nTQ|HGEkrvz`m>+ zY#8=vSv;{WQmTfBB-jU^2b9{+6|xuTr&nlkahtEoVpV}1JX$9yz~nJoL;v`rRhOzV zR@g-~1E8&!Hyh{@`JHz_-j3#Bka`|D$SNM__nKTza~E;&)Jr+ig>8@w_g4GH(Dl)^ zT=ZINgu3&>tu=c#Kp<*M6ijJ+Vyx4AyMb2XnA(t?IM{~ zSNd_Yux}!w${81qs1&41%r06-5{;;|k2ylSKSE2~Owz0pV^=){o8U*HVc*F`CUugqn;j0jiKsSOP8SKt0hE4^M5I=L$X7*V`yv6x8OnW-WYlP(x9><4;#_x ztrk2!(qvpC=nR{O=7qY)Yrg5#)iIh+^u(4EpA)L|sCD<1ItMH58$Rhg{*?~%7@TJd zO0*Y#>I{6Bx)g!K%P)7v13HsOt7ofb_MUg+{QX{OL?5g{#tS$>H3i94ES zIGT%SPl>ict0UposWYAF0I{moDBV!B+@fM@uzQ`T_Y508$!s6gYP0@y8EucQd(E9K zv;%M(>8pCVH8}{*lI(3gz?UrTV=f`@N5)A+{co{Vu zE=Yk{#sTu`HDkd%$T#vP9{#3+S>i6NT|9@icZ%|{D|bJoyB6?V{Pax5?U{5jIK7JU zZL-3L9hwd43;M?a^za8-hbLHPlzn33L*iU|P|o>eM(Exwta|)hs~uT*3vJH%zORvG z06s7Vi#A4_Kgw6R(l>eBpoisKiwD5BRCcQ=DI$7iHmDWl(7AdK!|!K2899 z&_v@B={o65=deO`kr|P-PF~!(!MinyY-&v8GXdh-52Cp~Zn*gd$c=Lf!G)S%I`Mw^ zn|!zkzQ5S=A!w-gp7$q16`D&9(2HTwnAMx-lg1v3h8W2LeZ3P6aQ(29c;`M-iQiiS z?-?zsAtLtqxXN6$dkcsiW!TsI7BVoI6o}Jx-3>%W4t$6Kv1jEl-588&rMBU{CKHBo=`6OpTt{}HE`)=ToU!$wIZ?b$P~hf00cuCxOU1cYXbN5iB&m;FiiATQk&}{M z@+Lz4aM(hc;sq@O*J))tv{Ds#Zw(5@&$n#^p$q{a81ucOqiO#~AIhr|An>!li=5xXV7V-~k!7zj5hN%*Z^k~6M2|Hp1BQ(V0P&m`= zYa1VEzum!x+>!03R8mSN|3#XhOeG%e(}XSdt1tDFDit7pZpeq}CrktbLW;sgVxUkH zEBCAx2Rb!iT`pw<*nPB3I9-IkdU|p=##J7G(UxS&@8`4$b`rYjG5TCK)gD29Kswb+=sLWFMA)vK6I@ z@AJf^j?AW{M@klOJPHU{cZuG%y6=XlQa6yiSb@zdNW#yqsGUoL73B3o>82n=gU-m_ zAn$?qKyC*k{5Gsr8$1kd2!&5CJ^&l}%ey>8D6I&(&?Op|C>1|sQKBDK z5U;KfU77?%OrTl4pe?F>CPEvCUMjl=F+~;36u|Iy_|gY9AUAN7`4DboT6T8m^F#%A zhbzYJ3HbvoAdMYBJYwL=50X>ADNl9Aq?q350y<`nF&E3o&G!4@jcY!zdj-T2i8Z1$ zz*8}w;94YU=BiauuWWXzTJzMaaqZucVW zPDSw=BHTAPyX*0?3gj`gv3mQeNZ=!p_p7_+WW+;>iW|OoGtR0)vR^`BV_aCJy|5EL zPk%~|DIaYL5oy+xO3H}q*p%z-d6y7jvJoMg8H-+0JV}}O7em>adoc$Q$Uz7}x$T07 zHv9cbfsSA}5}=9OoNzr#An{<17=gt|Qr|tL2$%^>xx;YBA}qMm>v(wvpP8hbx}q>j z?=dJR7`Xpgk`<8-OSLXe9nP6~JsjDs6@8gHp%oqN$$w+VErn8fo_W_qbOw7fn z?UUJwiQ0JM%6zj49sQKorkJiSz~ZVWE+!g7sTflowAM8Zr)3ZZjH zI=R*n<0Wv(XKYRhI8fdA3LL*Y5)CVTnpJ)`zS%b*q zJ|<`m5+gP%QxsTLKV7agX#rQ6EN@xw;)|;6Xe~KL8=9HQ(HQh=J7HYatj=kYmOlfW zW9UQ7o|0Z_AQ9hFkESp1embWEUHcic;C$<~UgW$4ptY(>Mi}0!Iwxj00J8sQ$ygRo^mNSWh5rS<~x$jPUfMeu%l?n`veh zL1TF8Iz8`p$_11i&-7P*qgDsWapyTU5~(qvm4r93BiVS>VA$>gwHa%uM%*&_gwlma zG;P0}#>VLVI^luu)110HZwpNCSZ~lDCU;xq_x%CaPkj2C*pMufcw;E061zQVwr3 zbDrEEdcwmFU<4-a)RFp!s6UFNKx8q(@B{I&rI2z*Eek9K;it0O<^*0U&u6-0iL^-FB3ohTgS zu)5L~Q#?GY%MLcFfIJv1B-b20(f3Q+cgx)v~1O zpuB1W-dd!-%c~Mo32GDsT2wS88g_EzJ?x1}+FYqAI|ipzDx+VY6cCMd6pb~PY>_mm zUkWIX=9CZjduH(A?D&EA7c;jL?fhwvVU&*^w t>HEhiU}Vxxd&pJ5^mt?@sgP7eB0L^}0LQzD`Ti3+Q9O4#8WsxV{{a*z0tWy9 diff --git a/packages/core/solidity/src/account.ts b/packages/core/solidity/src/account.ts index 3687328fb..95d191b6c 100644 --- a/packages/core/solidity/src/account.ts +++ b/packages/core/solidity/src/account.ts @@ -247,12 +247,16 @@ function overrideRawSignatureValidation(c: ContractBuilder, opts: AccountOptions const signerBaseName = signers[opts.signer].name; const signerName = opts.upgradeable ? upgradeableName(signerBaseName) : signerBaseName; - c.addImportOnly({ - name: 'AbstractSigner', - path: '@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol', - transpiled: false, - }); - c.addOverride({ name: 'AbstractSigner', transpiled: false }, signerFunctions._rawSignatureValidation); + // WebAuthnSigner depends inherits from P256Signer, so the AbstractSigner override is handled by `addSigner` + if (opts.signer !== 'WebAuthn') { + c.addImportOnly({ + name: 'AbstractSigner', + path: '@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol', + transpiled: false, + }); + c.addOverride({ name: 'AbstractSigner', transpiled: false }, signerFunctions._rawSignatureValidation); + } + c.addOverride({ name: 'AccountERC7579' }, signerFunctions._rawSignatureValidation); c.setFunctionComments( [ diff --git a/packages/core/solidity/src/api.ts b/packages/core/solidity/src/api.ts index 15e0532f8..c39d1c8dd 100644 --- a/packages/core/solidity/src/api.ts +++ b/packages/core/solidity/src/api.ts @@ -37,6 +37,7 @@ import { defaults as customDefaults, isAccessControlRequired as customIsAccessControlRequired, } from './custom'; +import { getVersionedRemappings } from './get-versioned-remappings'; export interface WizardContractAPI { /** @@ -44,6 +45,18 @@ export interface WizardContractAPI { */ print: (opts?: Options) => string; + /** + * Returns remappings that map unversioned import prefixes to versioned import prefixes. + * @example + * ```ts + * [ + * "@openzeppelin/contracts/=@openzeppelin/contracts@5.5.0/", + * "@openzeppelin/contracts-upgradeable/=@openzeppelin/contracts-upgradeable@5.5.0/" + * ] + * ``` + */ + getVersionedRemappings: (opts?: Options) => string[]; + /** * The default options that are used for `print`. */ @@ -69,40 +82,48 @@ export type Custom = WizardContractAPI & AccessControlAPI { + const remappings = getVersionedRemappings({}); + t.is(remappings.length, 1); + t.is(remappings[0], `@openzeppelin/contracts/=@openzeppelin/contracts@${contracts.version}/`); + t.snapshot(remappings); +}); + +test('getVersionedRemappings upgradeable uups', t => { + const remappings = getVersionedRemappings({ upgradeable: 'uups' }); + t.is(remappings.length, 2); + t.is(remappings[0], `@openzeppelin/contracts/=@openzeppelin/contracts@${contracts.version}/`); + t.is(remappings[1], `@openzeppelin/contracts-upgradeable/=@openzeppelin/contracts-upgradeable@${contracts.version}/`); + t.snapshot(remappings); +}); + +test('getVersionedRemappings upgradeable transparent', t => { + const remappings = getVersionedRemappings({ upgradeable: 'transparent' }); + t.is(remappings.length, 2); + t.is(remappings[0], `@openzeppelin/contracts/=@openzeppelin/contracts@${contracts.version}/`); + t.is(remappings[1], `@openzeppelin/contracts-upgradeable/=@openzeppelin/contracts-upgradeable@${contracts.version}/`); + t.snapshot(remappings); +}); diff --git a/packages/core/solidity/src/get-versioned-remappings.test.ts.md b/packages/core/solidity/src/get-versioned-remappings.test.ts.md new file mode 100644 index 000000000..7b098ad22 --- /dev/null +++ b/packages/core/solidity/src/get-versioned-remappings.test.ts.md @@ -0,0 +1,31 @@ +# Snapshot report for `src/get-versioned-remappings.test.ts` + +The actual snapshot is saved in `get-versioned-remappings.test.ts.snap`. + +Generated by [AVA](https://avajs.dev). + +## getVersionedRemappings not upgradeable + +> Snapshot 1 + + [ + '@openzeppelin/contracts/=@openzeppelin/contracts@5.5.0/', + ] + +## getVersionedRemappings upgradeable uups + +> Snapshot 1 + + [ + '@openzeppelin/contracts/=@openzeppelin/contracts@5.5.0/', + '@openzeppelin/contracts-upgradeable/=@openzeppelin/contracts-upgradeable@5.5.0/', + ] + +## getVersionedRemappings upgradeable transparent + +> Snapshot 1 + + [ + '@openzeppelin/contracts/=@openzeppelin/contracts@5.5.0/', + '@openzeppelin/contracts-upgradeable/=@openzeppelin/contracts-upgradeable@5.5.0/', + ] diff --git a/packages/core/solidity/src/get-versioned-remappings.test.ts.snap b/packages/core/solidity/src/get-versioned-remappings.test.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..061c1f517d39c34cf6d72935f787b5a3fb502ea0 GIT binary patch literal 302 zcmV+}0nz?JRzVd!T8?e zy$NU+g7_u%$NUu$3%qr! z0H*++eku_CRe{eOqAuuiz<=DUG8o!7eOV~`#X{=Y1jk;C{=cE#0k{}nrw{`G0C-T0 A&j0`b literal 0 HcmV?d00001 diff --git a/packages/core/solidity/src/get-versioned-remappings.ts b/packages/core/solidity/src/get-versioned-remappings.ts new file mode 100644 index 000000000..c14cf9664 --- /dev/null +++ b/packages/core/solidity/src/get-versioned-remappings.ts @@ -0,0 +1,10 @@ +import type { CommonOptions } from './common-options'; +import contracts from '../openzeppelin-contracts'; + +export function getVersionedRemappings(opts?: CommonOptions): string[] { + const remappings = [`@openzeppelin/contracts/=@openzeppelin/contracts@${contracts.version}/`]; + if (opts?.upgradeable) { + remappings.push(`@openzeppelin/contracts-upgradeable/=@openzeppelin/contracts-upgradeable@${contracts.version}/`); + } + return remappings; +} diff --git a/packages/core/solidity/src/signer.ts b/packages/core/solidity/src/signer.ts index 7d91f60cf..32140008e 100644 --- a/packages/core/solidity/src/signer.ts +++ b/packages/core/solidity/src/signer.ts @@ -3,7 +3,16 @@ import { OptionsError } from './error'; import type { Upgradeable } from './set-upgradeable'; import { defineFunctions } from './utils/define-functions'; -export const SignerOptions = [false, 'ECDSA', 'EIP7702', 'P256', 'RSA', 'Multisig', 'MultisigWeighted'] as const; +export const SignerOptions = [ + false, + 'ECDSA', + 'EIP7702', + 'Multisig', + 'MultisigWeighted', + 'P256', + 'RSA', + 'WebAuthn', +] as const; export type SignerOptions = (typeof SignerOptions)[number]; export function addSigner(c: ContractBuilder, signer: SignerOptions, upgradeable: Upgradeable): void { @@ -34,6 +43,26 @@ export function addSigner(c: ContractBuilder, signer: SignerOptions, upgradeable ); break; } + case 'WebAuthn': { + signerArgs.P256.forEach(arg => c.addConstructorArgument(arg)); + c.addParent( + signers.P256, + signerArgs.P256.map(arg => ({ lit: arg.name })), + ); + c.addParent(signers[signer]); + c.addImportOnly({ + name: 'AbstractSigner', + path: '@openzeppelin/contracts/utils/cryptography/signers/AbstractSigner.sol', + transpiled: false, + }); + c.addOverride({ name: 'AbstractSigner', transpiled: false }, signerFunctions._rawSignatureValidation); + c.addOverride({ name: 'SignerP256' }, signerFunctions._rawSignatureValidation); + break; + } + default: { + const _: never = signer; + throw new Error('Unknown signer'); + } } } @@ -46,6 +75,14 @@ export const signers = { name: 'SignerEIP7702', path: '@openzeppelin/contracts/utils/cryptography/signers/SignerEIP7702.sol', }, + Multisig: { + name: 'MultiSignerERC7913', + path: '@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol', + }, + MultisigWeighted: { + name: 'MultiSignerERC7913Weighted', + path: '@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol', + }, P256: { name: 'SignerP256', path: '@openzeppelin/contracts/utils/cryptography/signers/SignerP256.sol', @@ -54,13 +91,9 @@ export const signers = { name: 'SignerRSA', path: '@openzeppelin/contracts/utils/cryptography/signers/SignerRSA.sol', }, - Multisig: { - name: 'MultiSignerERC7913', - path: '@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913.sol', - }, - MultisigWeighted: { - name: 'MultiSignerERC7913Weighted', - path: '@openzeppelin/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol', + WebAuthn: { + name: 'SignerWebAuthn', + path: '@openzeppelin/contracts/utils/cryptography/signers/SignerWebAuthn.sol', }, }; @@ -70,10 +103,6 @@ export const signerArgs: Record, { nam { name: 'qx', type: 'bytes32' }, { name: 'qy', type: 'bytes32' }, ], - RSA: [ - { name: 'e', type: 'bytes memory' }, - { name: 'n', type: 'bytes memory' }, - ], Multisig: [ { name: 'signers', type: 'bytes[] memory' }, { name: 'threshold', type: 'uint64' }, @@ -83,6 +112,11 @@ export const signerArgs: Record, { nam { name: 'weights', type: 'uint64[] memory' }, { name: 'threshold', type: 'uint64' }, ], + RSA: [ + { name: 'e', type: 'bytes memory' }, + { name: 'n', type: 'bytes memory' }, + ], + WebAuthn: [], }; export const signerFunctions = defineFunctions({ diff --git a/packages/core/stellar/README.md b/packages/core/stellar/README.md index 95578d74f..c73099e7c 100644 --- a/packages/core/stellar/README.md +++ b/packages/core/stellar/README.md @@ -38,12 +38,12 @@ Import the contract type(s) (for example, `fungible`) that you want to use from import { fungible } from '@openzeppelin/wizard-stellar'; ``` -To generate the source code for an Fungible contract with all of the default settings: +To generate the source code for a Fungible contract with all of the default settings: ```js const contract = fungible.print(); ``` -To generate the source code for an Fungible contract with some custom settings: +To generate the source code for a Fungible contract with some custom settings: ```js const contract = fungible.print({ pausable: true, diff --git a/packages/core/stellar/src/fungible.ts b/packages/core/stellar/src/fungible.ts index c9033e74b..083fe5105 100644 --- a/packages/core/stellar/src/fungible.ts +++ b/packages/core/stellar/src/fungible.ts @@ -204,7 +204,7 @@ function addPremint(c: ContractBuilder, amount: string) { } /** - * Calculates the initial supply that would be used in an Fungible contract based on a given premint amount and number of decimals. + * Calculates the initial supply that would be used in a Fungible contract based on a given premint amount and number of decimals. * * @param premint Premint amount in token units, may be fractional * @param decimals The number of decimals in the token diff --git a/packages/core/stellar/src/generate/non-fungible.ts b/packages/core/stellar/src/generate/non-fungible.ts index 4c008ad35..b86fb5c86 100644 --- a/packages/core/stellar/src/generate/non-fungible.ts +++ b/packages/core/stellar/src/generate/non-fungible.ts @@ -8,6 +8,7 @@ const booleans = [true, false]; const blueprint = { name: ['MyToken'], symbol: ['MTK'], + tokenUri: ['https://www.mytoken.com'], burnable: booleans, pausable: booleans, upgradeable: booleans, diff --git a/packages/core/stellar/src/non-fungible.test.ts b/packages/core/stellar/src/non-fungible.test.ts index 5fddbee3b..3293cac7a 100644 --- a/packages/core/stellar/src/non-fungible.test.ts +++ b/packages/core/stellar/src/non-fungible.test.ts @@ -153,6 +153,10 @@ testNonFungible('non-fungible - complex name', { pausable: true, }); +testNonFungible('non-fungible custom token uri', { + tokenUri: 'https://example.com/nfts/', +}); + testAPIEquivalence('non-fungible API default'); testAPIEquivalence('non-fungible API basic', { name: 'CustomToken', symbol: 'CTK' }); diff --git a/packages/core/stellar/src/non-fungible.test.ts.md b/packages/core/stellar/src/non-fungible.test.ts.md index 62e5ccafd..60e88769c 100644 --- a/packages/core/stellar/src/non-fungible.test.ts.md +++ b/packages/core/stellar/src/non-fungible.test.ts.md @@ -22,7 +22,7 @@ Generated by [AVA](https://avajs.dev). #[contractimpl]␊ impl MyToken {␊ pub fn __constructor(e: &Env) {␊ - let uri = String::from_str(e, "www.mytoken.com");␊ + let uri = String::from_str(e, "https://www.mytoken.com");␊ let name = String::from_str(e, "MyToken");␊ let symbol = String::from_str(e, "MTK");␊ Base::set_metadata(e, uri, name, symbol);␊ @@ -55,7 +55,7 @@ Generated by [AVA](https://avajs.dev). #[contractimpl]␊ impl MyToken {␊ pub fn __constructor(e: &Env) {␊ - let uri = String::from_str(e, "www.mytoken.com");␊ + let uri = String::from_str(e, "https://www.mytoken.com");␊ let name = String::from_str(e, "MyToken");␊ let symbol = String::from_str(e, "MTK");␊ Base::set_metadata(e, uri, name, symbol);␊ @@ -98,7 +98,7 @@ Generated by [AVA](https://avajs.dev). #[contractimpl]␊ impl MyToken {␊ pub fn __constructor(e: &Env, owner: Address) {␊ - let uri = String::from_str(e, "www.mytoken.com");␊ + let uri = String::from_str(e, "https://www.mytoken.com");␊ let name = String::from_str(e, "MyToken");␊ let symbol = String::from_str(e, "MTK");␊ Base::set_metadata(e, uri, name, symbol);␊ @@ -168,7 +168,7 @@ Generated by [AVA](https://avajs.dev). #[contractimpl]␊ impl MyToken {␊ pub fn __constructor(e: &Env, owner: Address) {␊ - let uri = String::from_str(e, "www.mytoken.com");␊ + let uri = String::from_str(e, "https://www.mytoken.com");␊ let name = String::from_str(e, "MyToken");␊ let symbol = String::from_str(e, "MTK");␊ Base::set_metadata(e, uri, name, symbol);␊ @@ -254,7 +254,7 @@ Generated by [AVA](https://avajs.dev). #[contractimpl]␊ impl MyToken {␊ pub fn __constructor(e: &Env, owner: Address) {␊ - let uri = String::from_str(e, "www.mytoken.com");␊ + let uri = String::from_str(e, "https://www.mytoken.com");␊ let name = String::from_str(e, "MyToken");␊ let symbol = String::from_str(e, "MTK");␊ Base::set_metadata(e, uri, name, symbol);␊ @@ -303,7 +303,7 @@ Generated by [AVA](https://avajs.dev). #[contractimpl]␊ impl MyToken {␊ pub fn __constructor(e: &Env) {␊ - let uri = String::from_str(e, "www.mytoken.com");␊ + let uri = String::from_str(e, "https://www.mytoken.com");␊ let name = String::from_str(e, "MyToken");␊ let symbol = String::from_str(e, "MTK");␊ Base::set_metadata(e, uri, name, symbol);␊ @@ -347,7 +347,7 @@ Generated by [AVA](https://avajs.dev). #[contractimpl]␊ impl MyToken {␊ pub fn __constructor(e: &Env, owner: Address) {␊ - let uri = String::from_str(e, "www.mytoken.com");␊ + let uri = String::from_str(e, "https://www.mytoken.com");␊ let name = String::from_str(e, "MyToken");␊ let symbol = String::from_str(e, "MTK");␊ Base::set_metadata(e, uri, name, symbol);␊ @@ -405,7 +405,7 @@ Generated by [AVA](https://avajs.dev). #[contractimpl]␊ impl MyToken {␊ pub fn __constructor(e: &Env, owner: Address) {␊ - let uri = String::from_str(e, "www.mytoken.com");␊ + let uri = String::from_str(e, "https://www.mytoken.com");␊ let name = String::from_str(e, "MyToken");␊ let symbol = String::from_str(e, "MTK");␊ Base::set_metadata(e, uri, name, symbol);␊ @@ -467,7 +467,7 @@ Generated by [AVA](https://avajs.dev). #[contractimpl]␊ impl MyToken {␊ pub fn __constructor(e: &Env, owner: Address) {␊ - let uri = String::from_str(e, "www.mytoken.com");␊ + let uri = String::from_str(e, "https://www.mytoken.com");␊ let name = String::from_str(e, "MyToken");␊ let symbol = String::from_str(e, "MTK");␊ Base::set_metadata(e, uri, name, symbol);␊ @@ -553,7 +553,7 @@ Generated by [AVA](https://avajs.dev). #[contractimpl]␊ impl MyToken {␊ pub fn __constructor(e: &Env, owner: Address) {␊ - let uri = String::from_str(e, "www.mytoken.com");␊ + let uri = String::from_str(e, "https://www.mytoken.com");␊ let name = String::from_str(e, "MyToken");␊ let symbol = String::from_str(e, "MTK");␊ Base::set_metadata(e, uri, name, symbol);␊ @@ -647,7 +647,7 @@ Generated by [AVA](https://avajs.dev). #[contractimpl]␊ impl MyToken {␊ pub fn __constructor(e: &Env) {␊ - let uri = String::from_str(e, "www.mytoken.com");␊ + let uri = String::from_str(e, "https://www.mytoken.com");␊ let name = String::from_str(e, "MyToken");␊ let symbol = String::from_str(e, "MTK");␊ Base::set_metadata(e, uri, name, symbol);␊ @@ -683,7 +683,7 @@ Generated by [AVA](https://avajs.dev). #[contractimpl]␊ impl MyToken {␊ pub fn __constructor(e: &Env, owner: Address) {␊ - let uri = String::from_str(e, "www.mytoken.com");␊ + let uri = String::from_str(e, "https://www.mytoken.com");␊ let name = String::from_str(e, "MyToken");␊ let symbol = String::from_str(e, "MTK");␊ Base::set_metadata(e, uri, name, symbol);␊ @@ -739,7 +739,7 @@ Generated by [AVA](https://avajs.dev). #[contractimpl]␊ impl MyToken {␊ pub fn __constructor(e: &Env, owner: Address) {␊ - let uri = String::from_str(e, "www.mytoken.com");␊ + let uri = String::from_str(e, "https://www.mytoken.com");␊ let name = String::from_str(e, "MyToken");␊ let symbol = String::from_str(e, "MTK");␊ Base::set_metadata(e, uri, name, symbol);␊ @@ -842,7 +842,7 @@ Generated by [AVA](https://avajs.dev). #[contractimpl]␊ impl CustomToken {␊ pub fn __constructor(e: &Env, owner: Address) {␊ - let uri = String::from_str(e, "www.mytoken.com");␊ + let uri = String::from_str(e, "https://www.mytoken.com");␊ let name = String::from_str(e, "Custom $ Token");␊ let symbol = String::from_str(e, "MTK");␊ Base::set_metadata(e, uri, name, symbol);␊ @@ -908,3 +908,36 @@ Generated by [AVA](https://avajs.dev). #[contractimpl]␊ impl Ownable for CustomToken {}␊ ` + +## non-fungible custom token uri + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.4.1␊ + #![no_std]␊ + ␊ + use soroban_sdk::{contract, contractimpl, Env, String};␊ + use stellar_macros::default_impl;␊ + use stellar_tokens::non_fungible::{Base, NonFungibleToken};␊ + ␊ + #[contract]␊ + pub struct MyToken;␊ + ␊ + #[contractimpl]␊ + impl MyToken {␊ + pub fn __constructor(e: &Env) {␊ + let uri = String::from_str(e, "https://example.com/nfts/");␊ + let name = String::from_str(e, "MyToken");␊ + let symbol = String::from_str(e, "MTK");␊ + Base::set_metadata(e, uri, name, symbol);␊ + }␊ + }␊ + ␊ + #[default_impl]␊ + #[contractimpl]␊ + impl NonFungibleToken for MyToken {␊ + type ContractType = Base;␊ + ␊ + }␊ + ` diff --git a/packages/core/stellar/src/non-fungible.test.ts.snap b/packages/core/stellar/src/non-fungible.test.ts.snap index 92c1b0daf738cac33c191c454b899b2f5298fc2e..52c1cee76caa9f0827d2b29a7bf15c1b1193101b 100644 GIT binary patch literal 1642 zcmV-w29^0iRzVe73mnX{8Cv0 zAjN&gbsvie00000000B+Tib5iHW==bo}#5gBDn`Z0NeK1(E_= zGf$u;su3cQDoMo&0$&V!fMIX2?g56~?qb;O9&4Zu7U@V%>^P1R(-(#;lRv5d@ckcu zQg8fDNZnoj>mOJIBE+nNc;Es;$%>zlS3xJl0VgQtJ5=zW-*_Gp=!dy~=C9niB0q0k zyYlwjpL4Ai*nIxw_bcB9E+!nWJoYdVfgfN7!PCcER;vZpX%r(N<$-P>cEGb3lb1M- zaTpM=DR3Af1~w_99Ynx7C4wPWaPZSdtDmiYY~8)RO{l|#*S4&LW5Bb94)=B;JaqHs zHYl!wC=P9~LH2C0DOf;W_13a}*+5Q&Tt+#B9`;cZ3P-lrTL`*~35SqS;uM;I@bD4h z*aqKG@>PCsOSbE+S=Qa{V(_*VCmp~AOI!h-9;7X_26D8vCBKWm!J!2J0J5J?faAE7 zWc?{y!VoNOkiF%+jr@dIfP@9$LH=|Q`iw>n7iIx7%Hf4$>!Cb!l{G zc}kLVS$|vZRgVR9zClkb);IP zU9Gc0?E{~(0Y!>~827zsOa6F}PG`-sdRFf0iR$E_lQ4oRy?q{P-hO|6*1Ww?4TOs3 zALTbqFkI|luv#tYup9dV6CO~)<&BYtF1$e>y(ZLRlL8O%H%(FTk8V8=X2ACh0l_|MU}!k|UyR~XVKAbb2WU9LO? z9ZExG&LyrCZI^XbmT1w|q?X!qQ5e?5^{0} zMx0;0DGbGED8+HL0Wbt$8wRAGI_8XC&k z%rj9#QqwdGZYuPi8c4btkYJKTnAH@sUusbDWQK~_R^bV@q9F(m6@zZ{@5>n!*S({F zVVNTL1t@ZtCY)fYyA)biIJl)nqckjb6A|oHW%hryaQw?;_OUa&65fi+_4r;d|FD7b zUhD*L-~iI>UGs$RN*;S$iyvA2eg#Q3`MQsBPvn` zVd^Xh$o}m*%p0M1Ay?oGIxffs%+w8VofZevy77u3QX!>VUK0J20HG~c<{HW1^rwfJ- zG?fmR#hhUbhA|k%&~(ON&gV?{e2$@L7o4K$Tk;&gP9p?RCK5vOr3JNcOU+mr*l z-bwt5ArIG_XZv0A_}^x6*L!dQq9_c)7v+z~L|{fxIP%g%k#YK?aUN#D9$r#pF1O8s z;c_2~uV50X)C%XUCJ_$9uakgb2PI-hF=~t%5|lx(SYg<{0x_4aJ3|AC}7s=UfjrYX>cdJh~~@m~zb}E!Rxy5b@b?F6Z>5tG+DNfKrlk z*0rRQ4RB`reeY^KbR{LBA>L23R>h0x-)Qu6&Af=-tPQ?Nzlgq`a6zM?EKh0Dc&3-l z6@Yu7v5fCjeCntz%**MQhD{wcu3=Quc|rZC<_-H8gMDafEE&lA`iY|qqEo|3G_Bax o8hEqK>}oZ0R}1eWNhM{DZV_MbRY00000000B+Tg`9VHWY80e(JOWI}8{wyf#IU3`)|qJ27a7HOqiv>sl-+ zu&wX}TA~^u66umuoWSs5$6a>bwL1*E?lA1SKW(5aS)?O5b>g^+Lmv!TCLgKy@q0f$ zQg6d{%=|s^+aE+mGA6u@MdSlzbTv%r>!=-*NKo7nyG)8--Ub1d_{S^%EL^&ANqsI~ zyL9`?pI6q`Vf)2bKdgQm`Gg9x`ZOR^Mqxxaf@e>6ob`3sWJw20B@eoh+=b^ILVqHi z4v8ZQ+mggF=CI8;YhwzVj7pAuDd6Y(YoD)u<}BWMMVTjL&~ltq5DiKzd z7mBMW>BKH<(R~-TC6DOq{>Gr+U?4BSK4$`bv+GdJX`9>K9V*JfG1) zf5w*yf~76Gzmm66pO{EUc?6I0r$Z>@Eb)Zo%fyAd-EMa+In175&1cEol?|gO#R;kF zn$Ksni#SZ$EUxXe^Nrp?=?Eb~q?ZthmB*-7DUaN2Xg8OZ_vkx)r5oK6t!iD3Y8^tx zM-(UzJ7nlRJL<=yY&si`(|2+gPj%;pcFHNP^zwxVhL8A$GlIgjjt2J%`wrLBNR+WrV$ZtYP0L zLLkJtdCc?#i9^5w@;fd(A6$%dEC%pW8N~vjLR*@I;+6|9@~fIa@99=_fzkNTV_izP z3*B8pJ<6n~gpr`%@NDNoHg5#EN#-^1)o183s#EsZs>f1xHDi2Ge=oio@s(C~JER~v zrXnPok(45aHgZ8SrwDA6*cmfG`i9M{C+i1cMLYN!h7DLsk&VXuipBFEjDTy^kCB_AA4vc5RUdg2(hs0bfpwFw?~AZhq)liEjhpWHSR&ad7SmRdBF zTA0h=B%-pKP+a}MAQYFcUO+-|EE%vX)^nEJYoavQp^Ao5b@iEQYzPl#J`gn~CC#$1 zrbF(j0i7oKy2fw+~~fR#3xv1m1ZL`}*lJe>vMIJi@X zbz?TluPqv&_u(}QdQ$+sW9pYDz{E_r#YKyYbB>GCI?OO*fUVzfy78X@uz%mUfB@U% z4JS)g=LeE2Yy1|e?Jn9m*hQOcv0yiZW`EY?(_@!cV`#vw9fJmJ-Lf>GsWiYY-YiqF zOu;gRrZNS4-e$_@Z7elA=hV#HY8T{9s<;%6?c0xyI9)TZq+{l9KaT8Xr=8av2c+g) z+V6&^|9TO3vqu*kn!*rzS^juRCE*mu6E8J18K*zu77!lolVwfjO3N+~=JQy41#`%x zRybufY4A9ClSZ6)IF-AaF*}4~$vA?g3WE+6KxoLgPXv@eb~YXfiEFOF}fLb7BmyVII9mf;QN2yhP?%k)mg qqmJ6ZzDzzhEb6FnEt8tf3*|>OZ&}9)Scjp;zVkntYRvetQvd)1I{o$l diff --git a/packages/core/stellar/src/non-fungible.ts b/packages/core/stellar/src/non-fungible.ts index 7230a3c80..1859626f6 100644 --- a/packages/core/stellar/src/non-fungible.ts +++ b/packages/core/stellar/src/non-fungible.ts @@ -16,6 +16,7 @@ import { toByteArray } from './utils/convert-strings'; export const defaults: Required = { name: 'MyToken', symbol: 'MTK', + tokenUri: 'https://www.mytoken.com', burnable: false, enumerable: false, consecutive: false, @@ -34,6 +35,7 @@ export function printNonFungible(opts: NonFungibleOptions = defaults): string { export interface NonFungibleOptions extends CommonContractOptions { name: string; symbol: string; + tokenUri?: string; burnable?: boolean; enumerable?: boolean; consecutive?: boolean; @@ -47,6 +49,7 @@ function withDefaults(opts: NonFungibleOptions): Required { return { ...opts, ...withCommonContractDefaults(opts), + tokenUri: opts.tokenUri ?? defaults.tokenUri, burnable: opts.burnable ?? defaults.burnable, consecutive: opts.consecutive ?? defaults.consecutive, enumerable: opts.enumerable ?? defaults.enumerable, @@ -87,7 +90,7 @@ export function buildNonFungible(opts: NonFungibleOptions): Contract { throw new OptionsError(errors); } - addBase(c, toByteArray(allOpts.name), toByteArray(allOpts.symbol), allOpts.pausable); + addBase(c, toByteArray(allOpts.name), toByteArray(allOpts.symbol), toByteArray(allOpts.tokenUri), allOpts.pausable); if (allOpts.pausable) { addPausable(c, allOpts.access); @@ -119,9 +122,9 @@ export function buildNonFungible(opts: NonFungibleOptions): Contract { return c; } -function addBase(c: ContractBuilder, name: string, symbol: string, pausable: boolean) { +function addBase(c: ContractBuilder, name: string, symbol: string, tokenUri: string, pausable: boolean) { // Set metadata - c.addConstructorCode('let uri = String::from_str(e, "www.mytoken.com");'); + c.addConstructorCode(`let uri = String::from_str(e, "${tokenUri}");`); c.addConstructorCode(`let name = String::from_str(e, "${name}");`); c.addConstructorCode(`let symbol = String::from_str(e, "${symbol}");`); c.addConstructorCode(`Base::set_metadata(e, uri, name, symbol);`); diff --git a/packages/core/stellar/src/zip-rust.ts b/packages/core/stellar/src/zip-rust.ts index 01bf1b106..520560d64 100644 --- a/packages/core/stellar/src/zip-rust.ts +++ b/packages/core/stellar/src/zip-rust.ts @@ -43,3 +43,6 @@ const addRustProjectReadme = (zip: JSZip) => zip.file('README.md', readme); export const zipRustProject = async (c: Contract, opts: GenericOptions) => addRustProjectReadme(createRustZipEnvironment(c, opts)); + +export const zipRustProjectBlob = async (c: Contract, opts: GenericOptions) => + await (await zipRustProject(c, opts)).generateAsync({ type: 'blob', compression: 'DEFLATE' }); diff --git a/packages/mcp/CHANGELOG.md b/packages/mcp/CHANGELOG.md index 2b50dbacf..f2b09a737 100644 --- a/packages/mcp/CHANGELOG.md +++ b/packages/mcp/CHANGELOG.md @@ -1,6 +1,20 @@ # Changelog +## 0.4.2 (2025-11-12) + +- Solidity account signer: Add `WebAuthn` to the list of signers available. ([#718](https://github.com/OpenZeppelin/contracts-wizard/pull/718)) +- Updated dependencies [[`be91f8f`](https://github.com/OpenZeppelin/contracts-wizard/commit/be91f8fee6f66ae8a045394fded8d46ef1383b9f)]: + - @openzeppelin/wizard@0.10.2 + - @openzeppelin/wizard-common@0.3.1 + +## 0.4.1 (2025-11-11) + +- **Breaking changes**: Solidity Stablecoin and RWA: Change `custodian` option to `freezable`. Replace ERC20Custodian with ERC20Freezable. ([#719](https://github.com/OpenZeppelin/contracts-wizard/pull/719)) +- Updated dependencies [[`6b8f8f5`](https://github.com/OpenZeppelin/contracts-wizard/commit/6b8f8f52b973946ea6ce441dcbc1cbf3c3a848f2), [`c14be02`](https://github.com/OpenZeppelin/contracts-wizard/commit/c14be0291fca353946fc7583046de8669c209cc4), [`bec86b5`](https://github.com/OpenZeppelin/contracts-wizard/commit/bec86b542daf8d4ebacaa512b5a66f970500f826), [`ce8fbba`](https://github.com/OpenZeppelin/contracts-wizard/commit/ce8fbba5f006fcbc822e9e42b860c9fa7a9827df), [`5c1fa0f`](https://github.com/OpenZeppelin/contracts-wizard/commit/5c1fa0f29c8a86952a9be111235e8cd615a889ca)]: + - @openzeppelin/wizard@0.10.1 + - @openzeppelin/wizard-common@0.3.0 + ## 0.4.0 (2025-11-03) - Update `@openzeppelin/contracts` and `@openzeppelin/contracts-upgradeable` dependencies to 5.5.0 ([#681](https://github.com/OpenZeppelin/contracts-wizard/pull/681)) diff --git a/packages/mcp/package.json b/packages/mcp/package.json index 9d535a8e7..bad2d7357 100644 --- a/packages/mcp/package.json +++ b/packages/mcp/package.json @@ -1,6 +1,6 @@ { "name": "@openzeppelin/contracts-mcp", - "version": "0.4.0", + "version": "0.4.2", "description": "OpenZeppelin Contracts MCP Server", "license": "AGPL-3.0-only", "repository": "https://github.com/OpenZeppelin/contracts-wizard", @@ -26,8 +26,8 @@ }, "dependencies": { "@modelcontextprotocol/sdk": "^1.11.1", - "@openzeppelin/wizard-common": "^0.2.0", - "@openzeppelin/wizard": "^0.10.0", + "@openzeppelin/wizard-common": "^0.3.1", + "@openzeppelin/wizard": "^0.10.2", "@openzeppelin/wizard-stylus": "^0.2.0", "@openzeppelin/wizard-stellar": "^0.4.2", "@openzeppelin/wizard-cairo": "^2.1.0" diff --git a/packages/mcp/src/solidity/schemas.ts b/packages/mcp/src/solidity/schemas.ts index 9fbe46e7d..6beeb1ff4 100644 --- a/packages/mcp/src/solidity/schemas.ts +++ b/packages/mcp/src/solidity/schemas.ts @@ -127,10 +127,11 @@ export const accountSchema = { .literal(false) .or(z.literal('ECDSA')) .or(z.literal('EIP7702')) - .or(z.literal('P256')) - .or(z.literal('RSA')) .or(z.literal('Multisig')) .or(z.literal('MultisigWeighted')) + .or(z.literal('P256')) + .or(z.literal('RSA')) + .or(z.literal('WebAuthn')) .optional() .describe(solidityAccountDescriptions.signer), batchedExecution: z.boolean().optional().describe(solidityAccountDescriptions.batchedExecution), diff --git a/packages/mcp/src/stellar/schemas.ts b/packages/mcp/src/stellar/schemas.ts index 0d80599e6..5d667b03e 100644 --- a/packages/mcp/src/stellar/schemas.ts +++ b/packages/mcp/src/stellar/schemas.ts @@ -57,6 +57,7 @@ export const stablecoinSchema = { export const nonFungibleSchema = { name: z.string().describe(commonDescriptions.name), symbol: z.string().describe(commonDescriptions.symbol), + tokenUri: z.string().optional().describe(stellarNonFungibleDescriptions.tokenUri), burnable: z.boolean().optional().describe(commonDescriptions.burnable), enumerable: z.boolean().optional().describe(stellarNonFungibleDescriptions.enumerable), consecutive: z.boolean().optional().describe(stellarNonFungibleDescriptions.consecutive), diff --git a/packages/mcp/src/stellar/tools/non-fungible.test.ts b/packages/mcp/src/stellar/tools/non-fungible.test.ts index 22464b5e9..59643e92d 100644 --- a/packages/mcp/src/stellar/tools/non-fungible.test.ts +++ b/packages/mcp/src/stellar/tools/non-fungible.test.ts @@ -34,6 +34,7 @@ test('basic', async t => { const params: z.infer = { name: 'TestToken', symbol: 'TST', + tokenUri: 'https://example.com/nft/', }; await assertAPIEquivalence(t, params, nonFungible.print); }); @@ -42,6 +43,7 @@ test('all', async t => { const params: DeepRequired> = { name: 'TestToken', symbol: 'TST', + tokenUri: 'https://example.com/nft/', burnable: true, enumerable: true, consecutive: true, diff --git a/packages/mcp/src/stellar/tools/non-fungible.ts b/packages/mcp/src/stellar/tools/non-fungible.ts index c46efc2a5..9c120e39c 100644 --- a/packages/mcp/src/stellar/tools/non-fungible.ts +++ b/packages/mcp/src/stellar/tools/non-fungible.ts @@ -10,10 +10,23 @@ export function registerStellarNonFungible(server: McpServer): RegisteredTool { 'stellar-non-fungible', makeDetailedPrompt(stellarPrompts.NonFungible), nonFungibleSchema, - async ({ name, symbol, burnable, enumerable, consecutive, pausable, mintable, sequential, upgradeable, info }) => { + async ({ + name, + symbol, + tokenUri, + burnable, + enumerable, + consecutive, + pausable, + mintable, + sequential, + upgradeable, + info, + }) => { const opts: NonFungibleOptions = { name, symbol, + tokenUri, burnable, enumerable, consecutive, diff --git a/packages/ui/.env.example b/packages/ui/.env.example new file mode 100644 index 000000000..233e8c6ab --- /dev/null +++ b/packages/ui/.env.example @@ -0,0 +1,4 @@ +ENV="dev" + +API_HOST=http://localhost:3000 +FARGATE_HOST=http://localhost:8888 \ No newline at end of file diff --git a/packages/ui/api/ai/.env.example b/packages/ui/api/ai/.env.example new file mode 100644 index 000000000..65cc4cea1 --- /dev/null +++ b/packages/ui/api/ai/.env.example @@ -0,0 +1,2 @@ +API_PORT=3000 +OPENAI_API_KEY= \ No newline at end of file diff --git a/packages/ui/api/ai/Dockerfile.dev b/packages/ui/api/ai/Dockerfile.dev new file mode 100644 index 000000000..1d2b791e9 --- /dev/null +++ b/packages/ui/api/ai/Dockerfile.dev @@ -0,0 +1,11 @@ +# Match netlify version environment +FROM denoland/deno:1.46.3 + +COPY . /app/ui/api/ai +COPY ../../common /app/common + +WORKDIR /app/ui/api/ai + +EXPOSE 3000 + +CMD ["deno","task","dev"] \ No newline at end of file diff --git a/packages/ui/api/ai-assistant/function-definitions/cairo-alpha-shared.ts b/packages/ui/api/ai/ai-assistant/function-definitions/cairo-alpha-shared.ts similarity index 94% rename from packages/ui/api/ai-assistant/function-definitions/cairo-alpha-shared.ts rename to packages/ui/api/ai/ai-assistant/function-definitions/cairo-alpha-shared.ts index aaa86dc6a..043cd799b 100644 --- a/packages/ui/api/ai-assistant/function-definitions/cairo-alpha-shared.ts +++ b/packages/ui/api/ai/ai-assistant/function-definitions/cairo-alpha-shared.ts @@ -1,12 +1,12 @@ import type { AiFunctionPropertyDefinition } from '../types/function-definition.ts'; import type { CairoAlphaCommonContractOptions, CairoAlphaRoyaltyInfoOptions } from '../types/languages.ts'; -import { infoDescriptions } from '../../../../common/src/ai/descriptions/common.ts'; +import { infoDescriptions } from '../../../../../common/src/ai/descriptions/common.ts'; import { + cairoAlphaAccessDescriptions, cairoCommonDescriptions, cairoMacrosDescriptions, - cairoAlphaAccessDescriptions, cairoRoyaltyInfoDescriptions, -} from '../../../../common/src/ai/descriptions/cairo.ts'; +} from '../../../../../common/src/ai/descriptions/cairo.ts'; const commonContractFunctionDescription = { upgradeable: { diff --git a/packages/ui/api/ai-assistant/function-definitions/cairo-alpha.ts b/packages/ui/api/ai/ai-assistant/function-definitions/cairo-alpha.ts similarity index 99% rename from packages/ui/api/ai-assistant/function-definitions/cairo-alpha.ts rename to packages/ui/api/ai/ai-assistant/function-definitions/cairo-alpha.ts index 760bc3058..74d4821db 100644 --- a/packages/ui/api/ai-assistant/function-definitions/cairo-alpha.ts +++ b/packages/ui/api/ai/ai-assistant/function-definitions/cairo-alpha.ts @@ -10,7 +10,7 @@ import { cairoGovernorDescriptions, cairoMultisigDescriptions, cairoVestingDescriptions, -} from '../../../../common/src/ai/descriptions/cairo.ts'; +} from '../../../../../common/src/ai/descriptions/cairo.ts'; export const cairoAlphaERC20AIFunctionDefinition = { name: 'ERC20', diff --git a/packages/ui/api/ai-assistant/function-definitions/cairo-shared.ts b/packages/ui/api/ai/ai-assistant/function-definitions/cairo-shared.ts similarity index 89% rename from packages/ui/api/ai-assistant/function-definitions/cairo-shared.ts rename to packages/ui/api/ai/ai-assistant/function-definitions/cairo-shared.ts index 805620d8c..9befc748e 100644 --- a/packages/ui/api/ai-assistant/function-definitions/cairo-shared.ts +++ b/packages/ui/api/ai/ai-assistant/function-definitions/cairo-shared.ts @@ -1,7 +1,10 @@ import type { AiFunctionPropertyDefinition } from '../types/function-definition.ts'; import type { CairoCommonContractOptions, CairoRoyaltyInfoOptions } from '../types/languages.ts'; -import { infoDescriptions } from '../../../../common/src/ai/descriptions/common.ts'; -import { cairoCommonDescriptions, cairoRoyaltyInfoDescriptions } from '../../../../common/src/ai/descriptions/cairo.ts'; +import { infoDescriptions } from '../../../../../common/src/ai/descriptions/common.ts'; +import { + cairoCommonDescriptions, + cairoRoyaltyInfoDescriptions, +} from '../../../../../common/src/ai/descriptions/cairo.ts'; const commonContractFunctionDescription = { upgradeable: { diff --git a/packages/ui/api/ai-assistant/function-definitions/cairo.ts b/packages/ui/api/ai/ai-assistant/function-definitions/cairo.ts similarity index 99% rename from packages/ui/api/ai-assistant/function-definitions/cairo.ts rename to packages/ui/api/ai/ai-assistant/function-definitions/cairo.ts index 4a0dddbcd..3b62f3698 100644 --- a/packages/ui/api/ai-assistant/function-definitions/cairo.ts +++ b/packages/ui/api/ai/ai-assistant/function-definitions/cairo.ts @@ -9,7 +9,7 @@ import { cairoGovernorDescriptions, cairoMultisigDescriptions, cairoVestingDescriptions, -} from '../../../../common/src/ai/descriptions/cairo.ts'; +} from '../../../../../common/src/ai/descriptions/cairo.ts'; export const cairoERC20AIFunctionDefinition = { name: 'ERC20', diff --git a/packages/ui/api/ai-assistant/function-definitions/polkadot.ts b/packages/ui/api/ai/ai-assistant/function-definitions/polkadot.ts similarity index 100% rename from packages/ui/api/ai-assistant/function-definitions/polkadot.ts rename to packages/ui/api/ai/ai-assistant/function-definitions/polkadot.ts diff --git a/packages/ui/api/ai-assistant/function-definitions/shared.ts b/packages/ui/api/ai/ai-assistant/function-definitions/shared.ts similarity index 93% rename from packages/ui/api/ai-assistant/function-definitions/shared.ts rename to packages/ui/api/ai/ai-assistant/function-definitions/shared.ts index ae762b2ed..b21527d02 100644 --- a/packages/ui/api/ai-assistant/function-definitions/shared.ts +++ b/packages/ui/api/ai/ai-assistant/function-definitions/shared.ts @@ -1,5 +1,5 @@ import type { AiFunctionPropertyDefinition } from '../types/function-definition.ts'; -import { commonDescriptions } from '../../../../common/src/ai/descriptions/common.ts'; +import { commonDescriptions } from '../../../../../common/src/ai/descriptions/common.ts'; const sharedFunctionDescription = { name: { type: 'string', description: commonDescriptions.name }, diff --git a/packages/ui/api/ai-assistant/function-definitions/solidity-shared.ts b/packages/ui/api/ai/ai-assistant/function-definitions/solidity-shared.ts similarity index 84% rename from packages/ui/api/ai-assistant/function-definitions/solidity-shared.ts rename to packages/ui/api/ai/ai-assistant/function-definitions/solidity-shared.ts index 512c38832..ec5342c62 100644 --- a/packages/ui/api/ai-assistant/function-definitions/solidity-shared.ts +++ b/packages/ui/api/ai/ai-assistant/function-definitions/solidity-shared.ts @@ -1,7 +1,7 @@ import type { AiFunctionPropertyDefinition } from '../types/function-definition.ts'; import type { SolidityCommonOptions } from '../types/languages.ts'; -import { infoDescriptions } from '../../../../common/src/ai/descriptions/common.ts'; -import { solidityCommonDescriptions } from '../../../../common/src/ai/descriptions/solidity.ts'; +import { infoDescriptions } from '../../../../../common/src/ai/descriptions/common.ts'; +import { solidityCommonDescriptions } from '../../../../../common/src/ai/descriptions/solidity.ts'; export const commonFunctionDescription = { access: { diff --git a/packages/ui/api/ai-assistant/function-definitions/solidity.ts b/packages/ui/api/ai/ai-assistant/function-definitions/solidity.ts similarity index 98% rename from packages/ui/api/ai-assistant/function-definitions/solidity.ts rename to packages/ui/api/ai/ai-assistant/function-definitions/solidity.ts index 33a088041..eda707697 100644 --- a/packages/ui/api/ai-assistant/function-definitions/solidity.ts +++ b/packages/ui/api/ai/ai-assistant/function-definitions/solidity.ts @@ -10,7 +10,7 @@ import { solidityStablecoinDescriptions, solidityGovernorDescriptions, solidityCommonDescriptions, -} from '../../../../common/src/ai/descriptions/solidity.ts'; +} from '../../../../../common/src/ai/descriptions/solidity.ts'; export const solidityERC20AIFunctionDefinition = { name: 'ERC20', @@ -211,7 +211,7 @@ export const solidityAccountAIFunctionDefinition = { signer: { anyOf: [ { type: 'boolean', enum: [false] }, - { type: 'string', enum: ['ECDSA', 'EIP7702', 'P256', 'RSA', 'Multisig', 'MultisigWeighted'] }, + { type: 'string', enum: ['ECDSA', 'EIP7702', 'P256', 'Multisig', 'MultisigWeighted', 'RSA', 'WebAuthn'] }, ], description: solidityAccountDescriptions.signer, }, diff --git a/packages/ui/api/ai-assistant/function-definitions/stellar-shared.ts b/packages/ui/api/ai/ai-assistant/function-definitions/stellar-shared.ts similarity index 82% rename from packages/ui/api/ai-assistant/function-definitions/stellar-shared.ts rename to packages/ui/api/ai/ai-assistant/function-definitions/stellar-shared.ts index 6c030b1bc..b9920523c 100644 --- a/packages/ui/api/ai-assistant/function-definitions/stellar-shared.ts +++ b/packages/ui/api/ai/ai-assistant/function-definitions/stellar-shared.ts @@ -1,7 +1,7 @@ import type { AiFunctionPropertyDefinition } from '../types/function-definition.ts'; import type { StellarCommonContractOptions } from '../types/languages.ts'; -import { infoDescriptions } from '../../../../common/src/ai/descriptions/common.ts'; -import { stellarCommonDescriptions } from '../../../../common/src/ai/descriptions/stellar.ts'; +import { infoDescriptions } from '../../../../../common/src/ai/descriptions/common.ts'; +import { stellarCommonDescriptions } from '../../../../../common/src/ai/descriptions/stellar.ts'; export const stellarCommonFunctionDescription = { access: { diff --git a/packages/ui/api/ai-assistant/function-definitions/stellar.ts b/packages/ui/api/ai/ai-assistant/function-definitions/stellar.ts similarity index 94% rename from packages/ui/api/ai-assistant/function-definitions/stellar.ts rename to packages/ui/api/ai/ai-assistant/function-definitions/stellar.ts index 61b415283..31e87eb96 100644 --- a/packages/ui/api/ai-assistant/function-definitions/stellar.ts +++ b/packages/ui/api/ai/ai-assistant/function-definitions/stellar.ts @@ -7,7 +7,7 @@ import { stellarFungibleDescriptions, stellarNonFungibleDescriptions, stellarStablecoinDescriptions, -} from '../../../../common/src/ai/descriptions/stellar.ts'; +} from '../../../../../common/src/ai/descriptions/stellar.ts'; export const stellarFungibleAIFunctionDefinition = { name: 'Fungible', @@ -99,6 +99,10 @@ export const stellarNonFungibleAIFunctionDefinition = { type: 'boolean', description: stellarNonFungibleDescriptions.sequential, }, + tokenUri: { + type: 'string', + description: stellarNonFungibleDescriptions.tokenUri, + }, upgradeable: { type: 'boolean', description: stellarCommonDescriptions.upgradeable, diff --git a/packages/ui/api/ai-assistant/function-definitions/stylus-shared.ts b/packages/ui/api/ai/ai-assistant/function-definitions/stylus-shared.ts similarity index 92% rename from packages/ui/api/ai-assistant/function-definitions/stylus-shared.ts rename to packages/ui/api/ai/ai-assistant/function-definitions/stylus-shared.ts index be4570d6d..e4a10fe0c 100644 --- a/packages/ui/api/ai-assistant/function-definitions/stylus-shared.ts +++ b/packages/ui/api/ai/ai-assistant/function-definitions/stylus-shared.ts @@ -1,6 +1,6 @@ import type { AiFunctionPropertyDefinition } from '../types/function-definition.ts'; import type { StylusCommonContractOptions } from '../types/languages.ts'; -import { infoDescriptions } from '../../../../common/src/ai/descriptions/common.ts'; +import { infoDescriptions } from '../../../../../common/src/ai/descriptions/common.ts'; export const stylusCommonFunctionDescription = { access: { diff --git a/packages/ui/api/ai-assistant/function-definitions/stylus.ts b/packages/ui/api/ai/ai-assistant/function-definitions/stylus.ts similarity index 96% rename from packages/ui/api/ai-assistant/function-definitions/stylus.ts rename to packages/ui/api/ai/ai-assistant/function-definitions/stylus.ts index 5d6b52c11..2c8255be2 100644 --- a/packages/ui/api/ai-assistant/function-definitions/stylus.ts +++ b/packages/ui/api/ai/ai-assistant/function-definitions/stylus.ts @@ -6,7 +6,7 @@ import { stylusERC20Descriptions, stylusERC721Descriptions, stylusERC1155Descriptions, -} from '../../../../common/src/ai/descriptions/stylus.ts'; +} from '../../../../../common/src/ai/descriptions/stylus.ts'; export const stylusERC20AIFunctionDefinition = { name: 'ERC20', diff --git a/packages/ui/api/ai-assistant/types/assistant.ts b/packages/ui/api/ai/ai-assistant/types/assistant.ts similarity index 100% rename from packages/ui/api/ai-assistant/types/assistant.ts rename to packages/ui/api/ai/ai-assistant/types/assistant.ts diff --git a/packages/ui/api/ai-assistant/types/function-definition.ts b/packages/ui/api/ai/ai-assistant/types/function-definition.ts similarity index 100% rename from packages/ui/api/ai-assistant/types/function-definition.ts rename to packages/ui/api/ai/ai-assistant/types/function-definition.ts diff --git a/packages/ui/api/ai-assistant/types/helpers.ts b/packages/ui/api/ai/ai-assistant/types/helpers.ts similarity index 100% rename from packages/ui/api/ai-assistant/types/helpers.ts rename to packages/ui/api/ai/ai-assistant/types/helpers.ts diff --git a/packages/ui/api/ai-assistant/types/languages.ts b/packages/ui/api/ai/ai-assistant/types/languages.ts similarity index 85% rename from packages/ui/api/ai-assistant/types/languages.ts rename to packages/ui/api/ai/ai-assistant/types/languages.ts index 2a87463fa..8a33891dd 100644 --- a/packages/ui/api/ai-assistant/types/languages.ts +++ b/packages/ui/api/ai/ai-assistant/types/languages.ts @@ -1,23 +1,23 @@ // Solidity -import type { KindedOptions as SolidityKindedOptions } from '../../../../core/solidity/dist'; -export type { CommonOptions as SolidityCommonOptions } from '../../../../core/solidity/dist/common-options'; +import type { KindedOptions as SolidityKindedOptions } from '../../../../../core/solidity/dist'; +export type { CommonOptions as SolidityCommonOptions } from '../../../../../core/solidity/dist/common-options'; // Cairo -import type { KindedOptions as CairoKindedOptions } from '../../../../core/cairo/dist'; -export type { CommonContractOptions as CairoCommonContractOptions } from '../../../../core/cairo/dist/common-options'; -export type { RoyaltyInfoOptions as CairoRoyaltyInfoOptions } from '../../../../core/cairo/dist/set-royalty-info'; +import type { KindedOptions as CairoKindedOptions } from '../../../../../core/cairo/dist'; +export type { CommonContractOptions as CairoCommonContractOptions } from '../../../../../core/cairo/dist/common-options'; +export type { RoyaltyInfoOptions as CairoRoyaltyInfoOptions } from '../../../../../core/cairo/dist/set-royalty-info'; // Cairo-alpha -import type { KindedOptions as CairoAlphaKindedOptions } from '../../../../core/cairo_alpha/dist'; -export type { CommonContractOptions as CairoAlphaCommonContractOptions } from '../../../../core/cairo_alpha/dist/common-options'; -export type { RoyaltyInfoOptions as CairoAlphaRoyaltyInfoOptions } from '../../../../core/cairo_alpha/dist/set-royalty-info'; +import type { KindedOptions as CairoAlphaKindedOptions } from '../../../../../core/cairo_alpha/dist'; +export type { CommonContractOptions as CairoAlphaCommonContractOptions } from '../../../../../core/cairo_alpha/dist/common-options'; +export type { RoyaltyInfoOptions as CairoAlphaRoyaltyInfoOptions } from '../../../../../core/cairo_alpha/dist/set-royalty-info'; //Stellar -import type { KindedOptions as StellarKindedOptions } from '../../../../core/stellar/dist'; -import type { CommonContractOptions as StellarCommonContractOptionsBase } from '../../../../core/stellar/dist/common-options'; +import type { KindedOptions as StellarKindedOptions } from '../../../../../core/stellar/dist'; +import type { CommonContractOptions as StellarCommonContractOptionsBase } from '../../../../../core/stellar/dist/common-options'; export type StellarCommonContractOptions = Omit & { upgradeable?: false; }; // Stylus -import type { KindedOptions as StylusKindedOptions } from '../../../../core/stylus/dist'; -import type { CommonContractOptions as StylusCommonContractOptionsBase } from '../../../../core/stylus/dist/common-options'; +import type { KindedOptions as StylusKindedOptions } from '../../../../../core/stylus/dist'; +import type { CommonContractOptions as StylusCommonContractOptionsBase } from '../../../../../core/stylus/dist/common-options'; export type StylusCommonContractOptions = Omit & { access?: false }; type SolidityContractsOptions = Omit< diff --git a/packages/ui/deno.json b/packages/ui/api/ai/deno.json similarity index 74% rename from packages/ui/deno.json rename to packages/ui/api/ai/deno.json index e5823b49c..5b738b7dc 100644 --- a/packages/ui/deno.json +++ b/packages/ui/api/ai/deno.json @@ -11,7 +11,7 @@ }, "importMap": "./import_map.json", "tasks": { - "dev": "deno run --allow-all --env-file --watch --no-clear-screen scripts/deno/development-server.ts ", - "type:check": "deno check ./api --unstable-sloppy-imports" + "dev": "deno run --allow-all --env-file --watch --no-clear-screen development-server.ts ", + "type:check": "deno check ./paths/ai.ts --unstable-sloppy-imports" } } \ No newline at end of file diff --git a/packages/ui/deno.lock b/packages/ui/api/ai/deno.lock similarity index 98% rename from packages/ui/deno.lock rename to packages/ui/api/ai/deno.lock index 25d41623a..5e453a785 100644 --- a/packages/ui/deno.lock +++ b/packages/ui/api/ai/deno.lock @@ -2,10 +2,14 @@ "version": "3", "redirects": { "https://deno.land/std/fmt/colors.ts": "https://deno.land/std@0.224.0/fmt/colors.ts", +<<<<<<< HEAD:packages/ui/api/ai/deno.lock + "https://deno.land/std/path/mod.ts": "https://deno.land/std@0.224.0/path/mod.ts" +======= "https://deno.land/std/path/mod.ts": "https://deno.land/std@0.224.0/path/mod.ts", "https://esm.sh/crypto-js@^4.2.0/enc-hex?target=denonext": "https://esm.sh/crypto-js@4.2.0/enc-hex?target=denonext", "https://esm.sh/crypto-js@^4.2.0/sha1?target=denonext": "https://esm.sh/crypto-js@4.2.0/sha1?target=denonext", "https://esm.sh/uncrypto@^0.1.3?target=denonext": "https://esm.sh/uncrypto@0.1.3?target=denonext" +>>>>>>> upstream/master:packages/ui/deno.lock }, "remote": { "https://deno.land/std@0.224.0/assert/assert.ts": "09d30564c09de846855b7b071e62b5974b001bb72a4b797958fe0660e7849834", @@ -87,6 +91,9 @@ "https://deno.land/std@0.224.0/path/windows/relative.ts": "3e1abc7977ee6cc0db2730d1f9cb38be87b0ce4806759d271a70e4997fc638d7", "https://deno.land/std@0.224.0/path/windows/resolve.ts": "8dae1dadfed9d46ff46cc337c9525c0c7d959fb400a6308f34595c45bdca1972", "https://deno.land/std@0.224.0/path/windows/to_file_url.ts": "40e560ee4854fe5a3d4d12976cef2f4e8914125c81b11f1108e127934ced502e", +<<<<<<< HEAD:packages/ui/api/ai/deno.lock + "https://deno.land/std@0.224.0/path/windows/to_namespaced_path.ts": "4ffa4fb6fae321448d5fe810b3ca741d84df4d7897e61ee29be961a6aac89a4c" +======= "https://deno.land/std@0.224.0/path/windows/to_namespaced_path.ts": "4ffa4fb6fae321448d5fe810b3ca741d84df4d7897e61ee29be961a6aac89a4c", "https://esm.sh/@upstash/redis@1.25.2": "b9400ffe20e12237188f35ee3658f02e273ecd1abd421106af12f6ea916c81b0", "https://esm.sh/@upstash/redis@1.25.2/denonext/redis.mjs": "d8487c833ec520cc90f52b680b172282e91941b937bc9ea879b8347e407833cc", @@ -249,5 +256,6 @@ "npm:util@^0.12.5" ] } +>>>>>>> upstream/master:packages/ui/deno.lock } } diff --git a/packages/ui/scripts/deno/development-server.ts b/packages/ui/api/ai/development-server.ts similarity index 90% rename from packages/ui/scripts/deno/development-server.ts rename to packages/ui/api/ai/development-server.ts index 9d5239865..2016b5222 100644 --- a/packages/ui/scripts/deno/development-server.ts +++ b/packages/ui/api/ai/development-server.ts @@ -1,7 +1,7 @@ /// /// -import './log.ts'; -import { getEnvironmentVariableOr } from '../../api/utils/env.ts'; +import './utils/log.ts'; +import { getEnvironmentVariableOr } from './utils/env.ts'; import { dirname } from 'https://deno.land/std/path/mod.ts'; const developmentCors = new Response(undefined, { @@ -22,7 +22,7 @@ Deno.serve( try { // Dynamically import the route handler - const module = await import(`file://${dirname(Deno.cwd())}/ui/api${calledEndpoint}.ts`); + const module = await import(`file://${dirname(Deno.cwd())}/ai/paths${calledEndpoint}.ts`); if (module.default) { return module.default(request); diff --git a/packages/ui/import_map.json b/packages/ui/api/ai/import_map.json similarity index 100% rename from packages/ui/import_map.json rename to packages/ui/api/ai/import_map.json diff --git a/packages/ui/api/ai.ts b/packages/ui/api/ai/paths/ai.ts similarity index 71% rename from packages/ui/api/ai.ts rename to packages/ui/api/ai/paths/ai.ts index 5cf9e5ff4..b264204d5 100644 --- a/packages/ui/api/ai.ts +++ b/packages/ui/api/ai/paths/ai.ts @@ -1,19 +1,19 @@ -import * as solidityFunctions from './ai-assistant/function-definitions/solidity.ts'; -import * as polkadotFunctions from './ai-assistant/function-definitions/polkadot.ts'; -import * as cairoFunctions from './ai-assistant/function-definitions/cairo.ts'; -import * as cairoAlphaFunctions from './ai-assistant/function-definitions/cairo-alpha.ts'; -import * as stellarFunctions from './ai-assistant/function-definitions/stellar.ts'; -import * as stylusFunctions from './ai-assistant/function-definitions/stylus.ts'; -import { saveChatInRedisIfDoesNotExist } from './services/redis.ts'; -import type { ChatMessages } from './services/open-ai.ts'; -import { createOpenAiCompletionStream } from './services/open-ai.ts'; -import type { AiChatBodyRequest } from './ai-assistant/types/assistant.ts'; -import type { SupportedLanguage } from './ai-assistant/types/languages.ts'; +import * as solidityFunctions from '../ai-assistant/function-definitions/solidity.ts'; +import * as polkadotFunctions from '../ai-assistant/function-definitions/polkadot.ts'; +import * as cairoFunctions from '../ai-assistant/function-definitions/cairo.ts'; +import * as cairoAlphaFunctions from '../ai-assistant/function-definitions/cairo-alpha.ts'; +import * as stellarFunctions from '../ai-assistant/function-definitions/stellar.ts'; +import * as stylusFunctions from '../ai-assistant/function-definitions/stylus.ts'; +import { saveChatInRedisIfDoesNotExist } from '../services/redis.ts'; +import type { ChatMessages } from '../services/open-ai.ts'; +import { createOpenAiCompletionStream } from '../services/open-ai.ts'; +import type { AiChatBodyRequest } from '../ai-assistant/types/assistant.ts'; +import type { SupportedLanguage } from '../ai-assistant/types/languages.ts'; import type { AllContractsAIFunctionDefinitions, SimpleAiFunctionDefinition, -} from './ai-assistant/types/function-definition.ts'; -import { Cors } from './utils/cors.ts'; +} from '../ai-assistant/types/function-definition.ts'; +import { Cors } from '../utils/cors.ts'; const getFunctionsContext = ( language: TLanguage, diff --git a/packages/ui/api/services/dev-mocks/redis.ts b/packages/ui/api/ai/services/dev-mocks/redis.ts similarity index 100% rename from packages/ui/api/services/dev-mocks/redis.ts rename to packages/ui/api/ai/services/dev-mocks/redis.ts diff --git a/packages/ui/api/services/open-ai.ts b/packages/ui/api/ai/services/open-ai.ts similarity index 100% rename from packages/ui/api/services/open-ai.ts rename to packages/ui/api/ai/services/open-ai.ts diff --git a/packages/ui/api/services/redis.ts b/packages/ui/api/ai/services/redis.ts similarity index 100% rename from packages/ui/api/services/redis.ts rename to packages/ui/api/ai/services/redis.ts diff --git a/packages/ui/api/utils/cors.ts b/packages/ui/api/ai/utils/cors.ts similarity index 100% rename from packages/ui/api/utils/cors.ts rename to packages/ui/api/ai/utils/cors.ts diff --git a/packages/ui/api/utils/env.ts b/packages/ui/api/ai/utils/env.ts similarity index 100% rename from packages/ui/api/utils/env.ts rename to packages/ui/api/ai/utils/env.ts diff --git a/packages/ui/scripts/deno/log.ts b/packages/ui/api/ai/utils/log.ts similarity index 100% rename from packages/ui/scripts/deno/log.ts rename to packages/ui/api/ai/utils/log.ts diff --git a/packages/ui/api/docker-compose.yaml b/packages/ui/api/docker-compose.yaml new file mode 100644 index 000000000..bbb053a28 --- /dev/null +++ b/packages/ui/api/docker-compose.yaml @@ -0,0 +1,50 @@ +services: + stellar-api: + container_name: stellar-api + build: + context: ./stellar + dockerfile: Dockerfile.dev + volumes: + - ./stellar:/usr/src/stellar-api + - stellar-cargo-target:/usr/src/stellar-api/target + - stellar-cargo-cache:/usr/local/cargo/registry + - stellar-cargo-git:/usr/local/cargo/git + - stellar-tmp:/tmp + environment: + - RUSTFLAGS=-C debuginfo=0 + - CFLAGS=-g0 + - CXXFLAGS=-g0 + env_file: + - ./stellar/.env + ports: + - "8888:8888" + command: ["cargo", "watch", "-x", "run"] + tty: true + stdin_open: true + + deno-api: + container_name: deno-api + build: + context: ../.. + dockerfile: ui/api/ai/Dockerfile.dev + volumes: + - ./ai:/app/ui/api/ai + - ../../common:/app/common + - deno-cache:/deno-dir + env_file: + - ./ai/.env + environment: + - DENO_DIR=/deno-dir + - ENV=dev + ports: + - "3000:3000" + command: ["deno", "task", "dev"] + tty: true + stdin_open: true + +volumes: + stellar-cargo-target: + stellar-cargo-cache: + stellar-cargo-git: + stellar-tmp: + deno-cache: diff --git a/packages/ui/api/stellar/.dockerignore b/packages/ui/api/stellar/.dockerignore new file mode 100644 index 000000000..4d4b65263 --- /dev/null +++ b/packages/ui/api/stellar/.dockerignore @@ -0,0 +1,6 @@ +target +.git +.DS_Store + +.env +.env.* \ No newline at end of file diff --git a/packages/ui/api/stellar/.env.example b/packages/ui/api/stellar/.env.example new file mode 100644 index 000000000..fbfb3aa7b --- /dev/null +++ b/packages/ui/api/stellar/.env.example @@ -0,0 +1,2 @@ +RUST_LOG=debug +WIZARD_ORIGIN=http://localhost:8080 \ No newline at end of file diff --git a/packages/ui/api/stellar/Cargo.lock b/packages/ui/api/stellar/Cargo.lock new file mode 100644 index 000000000..63310e4e9 --- /dev/null +++ b/packages/ui/api/stellar/Cargo.lock @@ -0,0 +1,2384 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "actix-codec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-sink", + "memchr", + "pin-project-lite", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "actix-cors" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daa239b93927be1ff123eebada5a3ff23e89f0124ccb8609234e5103d5a5ae6d" +dependencies = [ + "actix-utils", + "actix-web", + "derive_more", + "futures-util", + "log", + "once_cell", + "smallvec", +] + +[[package]] +name = "actix-governor" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0cb8586d3fa368d00ef643e8ef77f5d3d5dfe5c7b333415a556bc12eb1c41a" +dependencies = [ + "actix-http", + "actix-web", + "futures", + "governor", +] + +[[package]] +name = "actix-http" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44dfe5c9e0004c623edc65391dfd51daa201e7e30ebd9c9bedf873048ec32bc2" +dependencies = [ + "actix-codec", + "actix-rt", + "actix-service", + "actix-utils", + "base64", + "bitflags", + "brotli", + "bytes", + "bytestring", + "derive_more", + "encoding_rs", + "flate2", + "foldhash", + "futures-core", + "h2", + "http", + "httparse", + "httpdate", + "itoa", + "language-tags", + "local-channel", + "mime", + "percent-encoding", + "pin-project-lite", + "rand", + "sha1", + "smallvec", + "tokio", + "tokio-util", + "tracing", + "zstd", +] + +[[package]] +name = "actix-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "actix-router" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" +dependencies = [ + "bytestring", + "cfg-if", + "http", + "regex", + "regex-lite", + "serde", + "tracing", +] + +[[package]] +name = "actix-rt" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24eda4e2a6e042aa4e55ac438a2ae052d3b5da0ecf83d7411e1a368946925208" +dependencies = [ + "futures-core", + "tokio", +] + +[[package]] +name = "actix-server" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a65064ea4a457eaf07f2fba30b4c695bf43b721790e9530d26cb6f9019ff7502" +dependencies = [ + "actix-rt", + "actix-service", + "actix-utils", + "futures-core", + "futures-util", + "mio", + "socket2 0.5.10", + "tokio", + "tracing", +] + +[[package]] +name = "actix-service" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e46f36bf0e5af44bdc4bdb36fbbd421aa98c79a9bce724e1edeb3894e10dc7f" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "actix-utils" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" +dependencies = [ + "local-waker", + "pin-project-lite", +] + +[[package]] +name = "actix-web" +version = "4.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a597b77b5c6d6a1e1097fddde329a83665e25c5437c696a3a9a4aa514a614dea" +dependencies = [ + "actix-codec", + "actix-http", + "actix-macros", + "actix-router", + "actix-rt", + "actix-server", + "actix-service", + "actix-utils", + "actix-web-codegen", + "bytes", + "bytestring", + "cfg-if", + "cookie", + "derive_more", + "encoding_rs", + "foldhash", + "futures-core", + "futures-util", + "impl-more", + "itoa", + "language-tags", + "log", + "mime", + "once_cell", + "pin-project-lite", + "regex", + "regex-lite", + "serde", + "serde_json", + "serde_urlencoded", + "smallvec", + "socket2 0.5.10", + "time", + "tracing", + "url", +] + +[[package]] +name = "actix-web-codegen" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f591380e2e68490b5dfaf1dd1aa0ebe78d84ba7067078512b4ea6e4492d622b8" +dependencies = [ + "actix-router", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "anstream" +version = "0.6.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301af1932e46185686725e0fad2f8f2aa7da69dd70bf6ecc44d6b703844a3933" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8bdeb6047d8983be085bab0ba1472e6dc604e7041dbf6fcd5e71523014fae9" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "403f75924867bb1033c59fbf0797484329750cfbe3c4325cd33127941fabc882" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.59.0", +] + +[[package]] +name = "arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "backtrace" +version = "0.3.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets 0.52.6", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "brotli" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9991eea70ea4f293524138648e41ee89b0b2b12ddef3b255effa43c8056e0e0d" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bstr" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "bumpalo" +version = "3.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" + +[[package]] +name = "bytestring" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e465647ae23b2823b0753f50decb2d5a86d2bb2cac04788fafd1f80e45378e5f" +dependencies = [ + "bytes", +] + +[[package]] +name = "bzip2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bea8dcd42434048e4f7a304411d9273a411f647446c1234a65ce0554923f4cff" +dependencies = [ + "libbz2-rs-sys", +] + +[[package]] +name = "cc" +version = "1.2.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7" +dependencies = [ + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "cookie" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" +dependencies = [ + "percent-encoding", + "time", + "version_check", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "dashmap" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] + +[[package]] +name = "deflate64" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b" + +[[package]] +name = "deranged" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derive_arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "derive_more" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "env_filter" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "jiff", + "log", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "flate2" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +dependencies = [ + "crc32fast", + "libz-rs-sys", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "globset" +version = "0.4.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5" +dependencies = [ + "aho-corasick", + "bstr", + "log", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "governor" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be93b4ec2e4710b04d9264c0c7350cdd62a8c20e5e4ac732552ebb8f0debe8eb" +dependencies = [ + "cfg-if", + "dashmap", + "futures-sink", + "futures-timer", + "futures-util", + "getrandom", + "no-std-compat", + "nonzero_ext", + "parking_lot", + "portable-atomic", + "quanta", + "rand", + "smallvec", + "spinning_top", + "web-time", +] + +[[package]] +name = "h2" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hashbrown" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "icu_collections" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" + +[[package]] +name = "icu_properties" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "potential_utf", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" + +[[package]] +name = "icu_provider" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +dependencies = [ + "displaydoc", + "icu_locale_core", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "impl-more" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a5a9a0ff0086c7a148acb942baaabeadf9504d10400b5a05645853729b9cd2" + +[[package]] +name = "indexmap" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +dependencies = [ + "equivalent", + "hashbrown 0.15.4", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + +[[package]] +name = "io-uring" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +dependencies = [ + "bitflags", + "cfg-if", + "libc", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "jiff" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be1f93b8b1eb69c77f24bbb0afdf66f54b632ee39af40ca21c4365a1d7347e49" +dependencies = [ + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde", +] + +[[package]] +name = "jiff-static" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "jobserver" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" +dependencies = [ + "getrandom", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "language-tags" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" + +[[package]] +name = "libbz2-rs-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" + +[[package]] +name = "libc" +version = "0.2.175" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" + +[[package]] +name = "libz-rs-sys" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "172a788537a2221661b480fee8dc5f96c580eb34fa88764d3205dc356c7e4221" +dependencies = [ + "zlib-rs", +] + +[[package]] +name = "linux-raw-sys" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + +[[package]] +name = "litemap" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" + +[[package]] +name = "local-channel" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6cbc85e69b8df4b8bb8b89ec634e7189099cea8927a276b7384ce5488e53ec8" +dependencies = [ + "futures-core", + "futures-sink", + "local-waker", +] + +[[package]] +name = "local-waker" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" + +[[package]] +name = "lock_api" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" + +[[package]] +name = "lzma-rust2" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c60a23ffb90d527e23192f1246b14746e2f7f071cb84476dd879071696c18a4a" +dependencies = [ + "crc", + "sha2", +] + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "log", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] + +[[package]] +name = "no-std-compat" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" + +[[package]] +name = "nonzero_ext" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" + +[[package]] +name = "parking_lot" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest", + "hmac", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "portable-atomic" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" + +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "potential_utf" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppmd-rust" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c834641d8ad1b348c9ee86dec3b9840d805acd5f24daa5f90c788951a52ff59b" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quanta" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3ab5a9d756f0d97bdc89019bd2e4ea098cf9cde50ee7564dde6b81ccc8f06c7" +dependencies = [ + "crossbeam-utils", + "libc", + "once_cell", + "raw-cpuid", + "wasi 0.11.1+wasi-snapshot-preview1", + "web-sys", + "winapi", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom", +] + +[[package]] +name = "raw-cpuid" +version = "11.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6df7ab838ed27997ba19a4664507e6f82b41fe6e20be42929332156e5e85146" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_syscall" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-lite" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rustc-demangle" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" + +[[package]] +name = "rustix" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.60.2", +] + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.141" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" +dependencies = [ + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "slab" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "spinning_top" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96d2d1d716fb500937168cc09353ffdc7a012be8475ac7308e1bdf0e3923300" +dependencies = [ + "lock_api", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "stellar-api" +version = "0.1.0" +dependencies = [ + "actix-cors", + "actix-governor", + "actix-web", + "dotenvy", + "env_logger", + "globset", + "libc", + "log", + "tempfile", + "walkdir", + "zip", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tempfile" +version = "3.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b61f8f20e3a6f7e0649d825294eaf317edce30f82cf6026e7e4cb9222a7d1e" +dependencies = [ + "fastrand", + "getrandom", + "once_cell", + "rustix", + "windows-sys 0.60.2", +] + +[[package]] +name = "time" +version = "0.3.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" + +[[package]] +name = "time-macros" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +dependencies = [ + "backtrace", + "bytes", + "io-uring", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "slab", + "socket2 0.6.0", + "windows-sys 0.59.0", +] + +[[package]] +name = "tokio-util" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", +] + +[[package]] +name = "typenum" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" + +[[package]] +name = "unicode-ident" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +dependencies = [ + "cfg-if", + "once_cell", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.3", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags", +] + +[[package]] +name = "writeable" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" + +[[package]] +name = "yoke" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zip" +version = "5.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f852905151ac8d4d06fdca66520a661c09730a74c6d4e2b0f27b436b382e532" +dependencies = [ + "aes", + "arbitrary", + "bzip2", + "constant_time_eq", + "crc32fast", + "deflate64", + "flate2", + "getrandom", + "hmac", + "indexmap", + "lzma-rust2", + "memchr", + "pbkdf2", + "ppmd-rust", + "sha1", + "time", + "zeroize", + "zopfli", + "zstd", +] + +[[package]] +name = "zlib-rs" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626bd9fa9734751fc50d6060752170984d7053f5a39061f524cda68023d4db8a" + +[[package]] +name = "zopfli" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edfc5ee405f504cd4984ecc6f14d02d55cfda60fa4b689434ef4102aae150cd7" +dependencies = [ + "bumpalo", + "crc32fast", + "log", + "simd-adler32", +] + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.15+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb81183ddd97d0c74cedf1d50d85c8d08c1b8b68ee863bdee9e706eedba1a237" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/packages/ui/api/stellar/Cargo.toml b/packages/ui/api/stellar/Cargo.toml new file mode 100644 index 000000000..32679a418 --- /dev/null +++ b/packages/ui/api/stellar/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "stellar-api" +version = "0.1.0" +edition = "2021" + + +[dependencies] +actix-web = "4.11.0" +actix-cors = "0.7.1" +actix-governor = "0.8" +env_logger = "0.11.8" +dotenvy = "0.15.7" +log = "0.4.28" +zip = "^5.1.1" +walkdir = "^2.5.0" +tempfile = "^3.21.0" +globset = "^0.4.16" +libc = "^0.2.175" + +[package.metadata.tools] +stellar_cli = "23.0.1" +stellar_scaffold_cli = "0.0.8" + +[[bin]] +name = "stellar-api" +path = "src/main.rs" diff --git a/packages/ui/api/stellar/Dockerfile.dev b/packages/ui/api/stellar/Dockerfile.dev new file mode 100644 index 000000000..ebd42b23c --- /dev/null +++ b/packages/ui/api/stellar/Dockerfile.dev @@ -0,0 +1,42 @@ +FROM rust:latest + +WORKDIR /usr/src/stellar-api + +RUN apt-get update && apt-get install -y \ + build-essential \ + pkg-config \ + libssl-dev \ + libdbus-1-dev \ + libudev-dev \ + libusb-1.0-0-dev \ + curl \ + jq \ + gdb\ + lldb \ + && rm -rf /var/lib/apt/lists/* + +ENV CFLAGS=-g0 \ + CXXFLAGS=-g0 + +RUN mkdir -p /opt/tmp && chmod 1777 /opt/tmp + +RUN cargo install cargo-watch + +RUN rustup update \ + && rustup target add wasm32v1-none + +COPY Cargo.toml Cargo.lock ./ +RUN cargo fetch + +# Install CLI tools with versions pinned from Cargo metadata +RUN set -eux; \ + STELLAR_CLI_VERSION=$(cargo metadata -q --format-version=1 | jq -r '.packages[] | select(.name=="stellar-api") | .metadata.tools.stellar_cli'); \ + TMPDIR=/opt/tmp cargo install --locked stellar-cli --version "${STELLAR_CLI_VERSION}" -j 1 + +RUN set -eux; \ + STELLAR_SCAFFOLD_CLI_VERSION=$(cargo metadata -q --format-version=1 | jq -r '.packages[] | select(.name=="stellar-api") | .metadata.tools.stellar_scaffold_cli'); \ + TMPDIR=/opt/tmp cargo install --locked stellar-scaffold-cli --version "${STELLAR_SCAFFOLD_CLI_VERSION}" -j 1 + +EXPOSE 8888 + +CMD ["cargo", "watch", "-x", "run"] diff --git a/packages/ui/api/stellar/Dockerfile.prod b/packages/ui/api/stellar/Dockerfile.prod new file mode 100644 index 000000000..d5f7bc757 --- /dev/null +++ b/packages/ui/api/stellar/Dockerfile.prod @@ -0,0 +1,62 @@ +FROM rust:bookworm AS builder +ENV DEBIAN_FRONTEND=noninteractive +ENV TMPDIR=/opt/tmp +RUN mkdir -p /opt/tmp /opt/target +ENV CARGO_TARGET_DIR=/opt/target + +WORKDIR /usr/src/stellar-api + +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential pkg-config libssl-dev libdbus-1-dev libudev-dev libusb-1.0-0-dev ca-certificates jq \ + && rm -rf /var/lib/apt/lists/* + +RUN rustup update stable && rustup target add wasm32v1-none + +COPY Cargo.toml Cargo.lock ./ +RUN --mount=type=cache,target=/usr/local/cargo/registry \ + --mount=type=cache,target=/usr/local/cargo/git \ + cargo fetch + +# Install CLI tools with versions pinned from Cargo metadata +RUN set -eux; \ + STELLAR_CLI_VERSION=$(cargo metadata -q --format-version=1 | jq -r '.packages[] | select(.name=="stellar-api") | .metadata.tools.stellar_cli'); \ + TMPDIR=/opt/tmp cargo install --locked stellar-cli --version "${STELLAR_CLI_VERSION}" -j 1 + +RUN set -eux; \ + STELLAR_SCAFFOLD_CLI_VERSION=$(cargo metadata -q --format-version=1 | jq -r '.packages[] | select(.name=="stellar-api") | .metadata.tools.stellar_scaffold_cli'); \ + TMPDIR=/opt/tmp cargo install --locked stellar-scaffold-cli --version "${STELLAR_SCAFFOLD_CLI_VERSION}" -j 1 + +COPY . . +RUN TMPDIR=/opt/tmp cargo build --release + +RUN strip /opt/target/release/stellar-api || true + +FROM rust:bookworm AS runtime +ENV DEBIAN_FRONTEND=noninteractive +WORKDIR /usr/local/bin + +RUN apt-get purge -y --auto-remove \ + build-essential pkg-config libssl-dev +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates libssl3 libdbus-1-3 libudev1 libusb-1.0-0 \ + && rm -rf /var/lib/apt/lists/* + +RUN useradd -u 10001 -m -s /usr/sbin/nologin appuser + +COPY --chown=appuser:appuser --from=builder /opt/target/release/stellar-api /usr/local/bin/stellar-api +COPY --from=builder /usr/local/cargo/bin/stellar /usr/local/bin/stellar +COPY --from=builder /usr/local/cargo/bin/stellar-scaffold /usr/local/bin/stellar-scaffold +RUN chmod 0755 /usr/local/bin/stellar-api /usr/local/bin/stellar /usr/local/bin/stellar-scaffold + +ENV CARGO_HOME=/home/appuser/.cargo +ENV RUSTUP_HOME=/home/appuser/.rustup +ENV PATH=/usr/local/cargo/bin:/usr/local/rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin:$PATH + +RUN mkdir -p $CARGO_HOME $RUSTUP_HOME && chown -R appuser:appuser /home/appuser + +USER appuser + +EXPOSE 8888 +ENV RUST_LOG=info + +ENTRYPOINT ["stellar-api"] \ No newline at end of file diff --git a/packages/ui/api/stellar/rustfmt.toml b/packages/ui/api/stellar/rustfmt.toml new file mode 100644 index 000000000..4e5f2bf9c --- /dev/null +++ b/packages/ui/api/stellar/rustfmt.toml @@ -0,0 +1,19 @@ +# Basic formatting +max_width = 100 +tab_spaces = 4 +hard_tabs = false +edition = "2024" + +# Code organization +reorder_imports = true +reorder_modules = true + +# Formatting preferences +merge_derives = true + +# Function and control flow formatting +fn_params_layout = "Tall" + +# Code style preferences +use_try_shorthand = true +use_field_init_shorthand = true diff --git a/packages/ui/api/stellar/src/config/mod.rs b/packages/ui/api/stellar/src/config/mod.rs new file mode 100644 index 000000000..6c63b9b69 --- /dev/null +++ b/packages/ui/api/stellar/src/config/mod.rs @@ -0,0 +1,2 @@ +mod server; +pub use server::*; diff --git a/packages/ui/api/stellar/src/config/server.rs b/packages/ui/api/stellar/src/config/server.rs new file mode 100644 index 000000000..02b8efa02 --- /dev/null +++ b/packages/ui/api/stellar/src/config/server.rs @@ -0,0 +1,38 @@ +use std::env; + +#[derive(Debug, Clone)] +pub struct ServerConfig { + /// The host address the server will bind to. + pub host: String, + /// The port number the server will listen on. + pub port: u16, + /// The number of requests allowed per second. + pub rate_limit_requests_per_second: u64, + /// Origin of the Wizard web application. + pub wizard_origin: String, +} + +impl ServerConfig { + /// Creates a new `ServerConfig` instance from environment variables. + /// + /// # Defaults + /// + /// - `HOST` defaults to `"0.0.0.0"`. + /// - `APP_PORT` defaults to `8080`. + /// - `RATE_LIMIT_REQUESTS_PER_SECOND` defaults to `100`. + pub fn from_environment_variables() -> Self { + Self { + host: env::var("HOST").unwrap_or_else(|_| "0.0.0.0".to_string()), + port: env::var("APP_PORT") + .unwrap_or_else(|_| "8888".to_string()) + .parse() + .unwrap_or(8888), + rate_limit_requests_per_second: env::var("RATE_LIMIT_REQUESTS_PER_SECOND") + .unwrap_or_else(|_| "100".to_string()) + .parse() + .unwrap_or(100), + wizard_origin: env::var("WIZARD_ORIGIN") + .unwrap_or_else(|_| "http://localhost:8080".to_string()), + } + } +} diff --git a/packages/ui/api/stellar/src/controllers/mod.rs b/packages/ui/api/stellar/src/controllers/mod.rs new file mode 100644 index 000000000..70e1359a9 --- /dev/null +++ b/packages/ui/api/stellar/src/controllers/mod.rs @@ -0,0 +1,2 @@ +mod upgrade_scaffold; +pub use upgrade_scaffold::*; diff --git a/packages/ui/api/stellar/src/controllers/upgrade_scaffold.rs b/packages/ui/api/stellar/src/controllers/upgrade_scaffold.rs new file mode 100644 index 000000000..8e3fe1843 --- /dev/null +++ b/packages/ui/api/stellar/src/controllers/upgrade_scaffold.rs @@ -0,0 +1,36 @@ +use crate::environment::{run_scaffold_upgrade_command, unzip_in_temporary_folder, zip_directory}; +use crate::utils::to_http_hidden_error; +use actix_web::{web, Error as HttpError}; +use std::path::{Path, PathBuf}; +use walkdir::WalkDir; + +fn list_files(dir: &Path) -> Vec { + WalkDir::new(dir) + .into_iter() + .filter_map(|e| e.ok()) + .filter(|e| e.file_type().is_file()) + .map(|e| e.into_path()) + .collect() +} + +pub async fn upgrade_to_scaffold(rust_contract_zip: web::Bytes) -> Result, HttpError> { + let contract_zipped_files = [ + "contracts/*/src/contract.rs", + "contracts/*/src/test.rs", + "contracts/*/src/lib.rs", + "contracts/*/Cargo.toml", + "Cargo.toml", + "README.md", + ]; + + let contracts_dir = + unzip_in_temporary_folder(rust_contract_zip.to_vec(), &contract_zipped_files) + .map_err(to_http_hidden_error)?; + + run_scaffold_upgrade_command(contracts_dir.path()).map_err(to_http_hidden_error)?; + + let zipped_env = zip_directory(contracts_dir.path()).map_err(to_http_hidden_error)?; + + contracts_dir.close().map_err(to_http_hidden_error)?; + Ok(zipped_env) +} diff --git a/packages/ui/api/stellar/src/environment/mod.rs b/packages/ui/api/stellar/src/environment/mod.rs new file mode 100644 index 000000000..019b841d1 --- /dev/null +++ b/packages/ui/api/stellar/src/environment/mod.rs @@ -0,0 +1,4 @@ +mod zip_folder; +pub use zip_folder::*; +mod scaffold_upgrade; +pub use scaffold_upgrade::*; diff --git a/packages/ui/api/stellar/src/environment/scaffold_upgrade.rs b/packages/ui/api/stellar/src/environment/scaffold_upgrade.rs new file mode 100644 index 000000000..0d72d5b1e --- /dev/null +++ b/packages/ui/api/stellar/src/environment/scaffold_upgrade.rs @@ -0,0 +1,25 @@ +use std::path::Path; +use std::{ + io::Error, + process::{Command, Stdio}, +}; + +pub fn run_scaffold_upgrade_command(project_dir_path: &Path) -> Result<(), Error> { + let output = Command::new("stellar") + .args(["scaffold", "upgrade", "--skip-prompt"]) + .stdin(Stdio::null()) + .stdout(Stdio::null()) + .stderr(Stdio::piped()) + .current_dir(project_dir_path) + .output()?; + + if output.status.success() { + Ok(()) + } else { + Err(Error::other(format!( + "'stellar scaffold upgrade' failed with code {:?}: {}", + output.status.code(), + String::from_utf8_lossy(&output.stderr) + ))) + } +} diff --git a/packages/ui/api/stellar/src/environment/zip_folder.rs b/packages/ui/api/stellar/src/environment/zip_folder.rs new file mode 100644 index 000000000..da6b19130 --- /dev/null +++ b/packages/ui/api/stellar/src/environment/zip_folder.rs @@ -0,0 +1,281 @@ +use crate::utils::{ + build_globset, create_dir_safe, expand_with_directories, is_glob_match, join_and_assert_inside, + to_zip_io_error, write_file_safe, +}; +use std::collections::HashSet; +use std::fs::{read, File}; +use std::io::{self, Cursor, Read, Seek, Write}; +use std::path::{Component, Path, PathBuf}; +use tempfile::{NamedTempFile, TempDir}; +use walkdir::WalkDir; +use zip::{ + read::ZipFile, + result::{ZipError, ZipResult}, + write::FileOptions, + CompressionMethod, ZipArchive, ZipWriter, +}; + +pub fn unzip_in_temporary_folder( + zip_data: Vec, + expected_files: &[&str], +) -> Result { + let mut temp_zip = NamedTempFile::new().map_err(to_zip_io_error)?; + + temp_zip.write_all(&zip_data).map_err(to_zip_io_error)?; + + let temp_dir = TempDir::new().map_err(to_zip_io_error)?; + + let file = File::open(temp_zip.path()).map_err(to_zip_io_error)?; + + let mut archive = ZipArchive::new(file).map_err(to_zip_io_error)?; + + secure_zip_extract(&mut archive, temp_dir.path(), expected_files)?; + + Ok(temp_dir) +} + +fn secure_zip_extract( + archive: &mut ZipArchive, + destination_path: &Path, + expected_files: &[&str], +) -> Result<(), ZipError> { + validate_archive_structure(archive, expected_files)?; + + let expected_globset = + build_globset(expand_with_directories(expected_files)).map_err(to_zip_io_error)?; + let mut seen_paths: HashSet = HashSet::with_capacity(archive.len()); + + let mut total_uncompressed: u64 = 0; + + for i in 0..archive.len() { + let entry = archive.by_index(i)?; + + let validated_entry = validate_entry_metadata(&entry)?; + + let entry_path = normalize_entry_path(&entry)?; + + validate_and_register_entry(&validated_entry, &expected_globset, &mut seen_paths)?; + + let target_full_path = join_and_assert_inside(destination_path, entry_path.as_path())?; + + if entry.is_dir() { + create_dir_safe(&target_full_path).map_err(to_zip_io_error)?; + continue; + } + + total_uncompressed = + validate_entry_size(&entry, total_uncompressed, &ZipEntryLimits::rust_env())?; + + if let Some(parent) = target_full_path.parent() { + create_dir_safe(parent)?; + } + + let size = entry.size(); + let mut limited_reader = entry.take(size); + write_file_safe( + &target_full_path, + destination_path, + size, + &mut limited_reader, + )?; + } + + Ok(()) +} + +fn validate_and_register_entry( + entry_path: &str, + expected_globset: &globset::GlobSet, + seen_paths: &mut HashSet, +) -> Result<(), ZipError> { + if seen_paths.contains(entry_path) { + return Err(ZipError::UnsupportedArchive("duplicate entry")); + } + + if is_glob_match(expected_globset, entry_path).is_err() { + return Err(ZipError::UnsupportedArchive("Unexpected zip content")); + } + + seen_paths.insert(entry_path.to_owned()); + + Ok(()) +} + +fn normalize_entry_path(entry: &ZipFile) -> Result { + let p = entry + .enclosed_name() + .ok_or_else(|| to_zip_io_error("invalid entry name"))?; + if p.is_absolute() + || p.components() + .any(|c| matches!(c, Component::Prefix { .. })) + { + return Err(ZipError::UnsupportedArchive("absolute or prefix path")); + } + Ok(p.to_path_buf()) +} + +pub struct ZipEntryLimits { + pub max_total_uncompressed: u64, + pub max_file_uncompressed: u64, + pub max_compression_ratio: u64, +} + +impl ZipEntryLimits { + pub const fn rust_env() -> Self { + Self { + max_total_uncompressed: 100 * 1024, // 100 KB + max_file_uncompressed: 50 * 1024, // 50 KB + max_compression_ratio: 200, + } + } +} + +fn validate_entry_size( + entry: &ZipFile, + total_uncompressed: u64, + zip_entry_limits: &ZipEntryLimits, +) -> Result { + let uncompressed = entry.size(); + let compressed = entry.compressed_size(); + + if uncompressed > zip_entry_limits.max_file_uncompressed { + return Err(ZipError::UnsupportedArchive("entry too large")); + } + + let new_total = total_uncompressed + .checked_add(uncompressed) + .ok_or_else(|| to_zip_io_error("Size overflow"))?; + if new_total > zip_entry_limits.max_total_uncompressed { + return Err(ZipError::UnsupportedArchive("archive too large")); + } + + if compressed.saturating_mul(zip_entry_limits.max_compression_ratio) < uncompressed { + return Err(ZipError::UnsupportedArchive("suspicious compression ratio")); + } + + Ok(new_total) +} + +fn validate_archive_structure( + archive: &ZipArchive, + expected_files: &[&str], +) -> Result<(), ZipError> { + if archive.len() != expected_entry_count(expected_files) { + return Err(ZipError::UnsupportedArchive("Unexpected zip file")); + } + + Ok(()) +} + +fn ancestors_rel(p: &Path) -> impl Iterator + '_ { + p.ancestors() + .take_while(|a| !a.as_os_str().is_empty()) + .map(Path::to_path_buf) +} + +pub fn expected_entry_count(file_globs: &[&str]) -> usize { + file_globs + .iter() + .flat_map(|pat| ancestors_rel(Path::new(pat))) + .collect::>() + .len() +} + +fn validate_entry_metadata(entry: &ZipFile) -> Result { + if entry.encrypted() { + return Err(ZipError::UnsupportedArchive( + "Encrypted entries are not allowed", + )); + } + + if entry.is_symlink() { + return Err(ZipError::UnsupportedArchive( + "Symlink entries are not allowed", + )); + } + + match entry.compression() { + CompressionMethod::Stored | CompressionMethod::Deflated => {} + _ => { + return Err(ZipError::UnsupportedArchive( + "Unsupported compression method", + )) + } + } + + let entry_path = entry + .enclosed_name() + .and_then(|p| p.to_str().map(|s| s.to_owned())) + .ok_or_else(|| to_zip_io_error("invalid entry name"))?; + + Ok(entry_path) +} + +pub fn zip_directory(zip_path: &Path) -> ZipResult> { + let mut zip_result = Vec::new(); + + { + let mut zip_writer = ZipWriter::new(Cursor::new(&mut zip_result)); + let compression_options = default_options(); + + for entry in WalkDir::new(zip_path).into_iter().filter_map(Result::ok) { + let path = entry.path(); + let is_dir = path.is_dir(); + let root_path = path.strip_prefix(zip_path).unwrap(); + + if root_path.as_os_str().is_empty() { + continue; + } + + let normalized_root_path = normalize_path(root_path); + + if is_dir { + add_directory_to_zip(&mut zip_writer, &normalized_root_path, compression_options)?; + } else { + add_file_to_zip( + &mut zip_writer, + path, + &normalized_root_path, + compression_options, + )?; + } + } + + zip_writer.finish()?; + } + + Ok(zip_result) +} + +fn normalize_path(p: &Path) -> String { + p.to_string_lossy().replace('\\', "/") +} + +fn default_options() -> FileOptions<'static, ()> { + FileOptions::default() + .compression_method(CompressionMethod::Deflated) + .unix_permissions(0o755) +} + +fn add_directory_to_zip( + zip: &mut ZipWriter, + name: &str, + options: FileOptions<()>, +) -> ZipResult<()> { + let mut dir = name.to_string(); + if !dir.ends_with('/') { + dir.push('/'); + } + zip.add_directory(dir, options) +} + +fn add_file_to_zip( + zip: &mut ZipWriter, + src_path: &Path, + root_path: &str, + options: FileOptions<()>, +) -> Result<(), ZipError> { + zip.start_file(root_path, options)?; + let bytes = read(src_path).map_err(to_zip_io_error)?; + zip.write_all(&bytes).map_err(to_zip_io_error) +} diff --git a/packages/ui/api/stellar/src/lib.rs b/packages/ui/api/stellar/src/lib.rs new file mode 100644 index 000000000..7b4f1c35f --- /dev/null +++ b/packages/ui/api/stellar/src/lib.rs @@ -0,0 +1,17 @@ +//! # API Module +//! +//! Contains HTTP API implementation for the stellar service. +//! +//! ## Structure +//! +//! * `config` - Configuration management for the API server +//! * `controllers` - Request handling and business logic +//! * `environment` - The logic for create, upgrading and zipping the contract environment +//! * `routes` - API endpoint definitions and routing +//! * `utils` - Some utility functions and error handling + +pub mod config; +pub mod controllers; +pub mod environment; +pub mod routes; +pub mod utils; diff --git a/packages/ui/api/stellar/src/main.rs b/packages/ui/api/stellar/src/main.rs new file mode 100644 index 000000000..faef40bee --- /dev/null +++ b/packages/ui/api/stellar/src/main.rs @@ -0,0 +1,58 @@ +use actix_cors::Cors; +use actix_governor::{Governor, GovernorConfigBuilder}; +use actix_web::{ + middleware::{self, Logger}, + web, App, HttpServer, +}; +use dotenvy::dotenv; +use log::info; +use std::sync::Arc; +use stellar_api::config::ServerConfig; + +use stellar_api::routes::configure_routes; + +#[actix_web::main] +async fn main() -> std::io::Result<()> { + dotenv().ok(); + env_logger::init(); + + let config = Arc::new(ServerConfig::from_environment_variables()); + + let rate_limit_config = GovernorConfigBuilder::default() + .requests_per_second(config.rate_limit_requests_per_second) + .finish() + .expect("Invalid rate limiter config: ensure rate_limit_requests_per_second is a positive integer"); + + let host = config.host.clone(); + let port = config.port; + + info!("Starting server on {host}:{port}"); + + HttpServer::new(move || { + let cors = { + let wizard_origin = config.wizard_origin.clone(); + Cors::default() + .allowed_origin_fn(move |origin, _req| { + if let Ok(origin_str) = origin.to_str() { + origin_str.ends_with("wizard.netlify.app") + || origin_str == "https://wizard.openzeppelin.com" + || origin_str == wizard_origin + } else { + false + } + }) + .allowed_methods(["POST"]) + .allow_any_header() + }; + + App::new() + .wrap(cors) + .wrap(Governor::new(&rate_limit_config)) + .wrap(middleware::Compress::default()) + .wrap(Logger::default()) + .service(web::scope("/stellar").configure(configure_routes)) + }) + .bind((host.as_str(), port))? + .run() + .await +} diff --git a/packages/ui/api/stellar/src/routes/health.rs b/packages/ui/api/stellar/src/routes/health.rs new file mode 100644 index 000000000..ba2fa4483 --- /dev/null +++ b/packages/ui/api/stellar/src/routes/health.rs @@ -0,0 +1,14 @@ +//! This module provides a health check endpoint for the API. +//! The `/health` endpoint can be used to verify that the service is running and responsive. +use actix_web::{get, web, HttpResponse}; + +#[get("/health")] +async fn health() -> Result { + Ok(HttpResponse::Ok().body("OK")) +} + +/// Initializes the health check service. +/// Registers the `health` endpoint with the provided service configuration. +pub fn init(cfg: &mut web::ServiceConfig) { + cfg.service(health); +} diff --git a/packages/ui/api/stellar/src/routes/mod.rs b/packages/ui/api/stellar/src/routes/mod.rs new file mode 100644 index 000000000..28d9a1767 --- /dev/null +++ b/packages/ui/api/stellar/src/routes/mod.rs @@ -0,0 +1,9 @@ +pub mod health; +pub mod upgrade_scaffold; + +use actix_web::web; + +pub fn configure_routes(cfg: &mut web::ServiceConfig) { + cfg.configure(health::init) + .configure(upgrade_scaffold::init); +} diff --git a/packages/ui/api/stellar/src/routes/upgrade_scaffold.rs b/packages/ui/api/stellar/src/routes/upgrade_scaffold.rs new file mode 100644 index 000000000..d6c346444 --- /dev/null +++ b/packages/ui/api/stellar/src/routes/upgrade_scaffold.rs @@ -0,0 +1,30 @@ +//! This module upgrade a Rust contract environment to a Scaffold environment +use crate::controllers::upgrade_to_scaffold; +use actix_web::{http::header, post, web, HttpResponse}; +use std::io::Cursor; +use zip::ZipArchive; + +#[post("/upgrade-scaffold")] +async fn download_scaffold_route(req: web::Bytes) -> Result { + if ZipArchive::new(Cursor::new(&req)).is_err() { + return Ok(HttpResponse::UnsupportedMediaType().body("invalid ZIP archive")); + } + + match upgrade_to_scaffold(req).await { + Ok(body) => Ok(HttpResponse::Ok() + .insert_header((header::CONTENT_TYPE, "application/zip")) + .insert_header(( + header::CONTENT_DISPOSITION, + "attachment; filename=archive.zip", + )) + .body(body)), + Err(error) => { + log::error!("Error upgrading scaffold: {error}"); + Ok(HttpResponse::InternalServerError().body("Internal error")) + } + } +} + +pub fn init(cfg: &mut web::ServiceConfig) { + cfg.service(download_scaffold_route); +} diff --git a/packages/ui/api/stellar/src/utils/dir.rs b/packages/ui/api/stellar/src/utils/dir.rs new file mode 100644 index 000000000..6a58f7404 --- /dev/null +++ b/packages/ui/api/stellar/src/utils/dir.rs @@ -0,0 +1,49 @@ +use crate::utils::{ensure_no_symlinks, to_io_error}; +use std::fs::{DirBuilder, OpenOptions}; +use std::io::{copy, Error as IoError, Read, Take}; +use std::os::unix::fs::DirBuilderExt; +use std::path::Path; + +pub fn create_dir_safe(path: &Path) -> Result<(), IoError> { + // 0o700 on Unix. On non-Unix, this compiles but ignores mode. + #[cfg(unix)] + { + use DirBuilderExt; + let mut b = DirBuilder::new(); + b.recursive(true) + .mode(0o700) + .create(path) + .map_err(to_io_error) + } + #[cfg(not(unix))] + { + fs::create_dir_all(path).map_err(utils::to_io_error::to_io_error) + } +} + +pub fn write_file_safe( + target: &Path, + root: &Path, + file_size: u64, + file_take: &mut Take, +) -> Result<(), IoError> { + ensure_no_symlinks(root, target).map_err(to_io_error)?; + + let mut file = { + let mut open_option = OpenOptions::new(); + open_option.write(true).create_new(true); + #[cfg(unix)] + { + use std::os::unix::fs::OpenOptionsExt; + open_option.custom_flags(libc::O_NOFOLLOW); + open_option.mode(0o600); + } + open_option.open(target).map_err(to_io_error)? + }; + + let written = copy(file_take, &mut file).map_err(to_io_error)?; + if written != file_size { + return Err(IoError::other("size mismatch")); + } + Ok(()) +} diff --git a/packages/ui/api/stellar/src/utils/errors.rs b/packages/ui/api/stellar/src/utils/errors.rs new file mode 100644 index 000000000..20db5a2ce --- /dev/null +++ b/packages/ui/api/stellar/src/utils/errors.rs @@ -0,0 +1,20 @@ +use actix_web::{error::ErrorInternalServerError, Error as HttpError}; +use log::error; +use std::fmt::Debug; +use std::io::Error as IOError; +use zip::result::ZipError; + +pub fn to_http_hidden_error(error: E) -> HttpError { + error!("Internal error: {error:?}"); + ErrorInternalServerError("Internal Server Error") +} + +pub fn to_io_error(error: E) -> IOError { + error!("IO error: {error:?}"); + IOError::other(format!("{error:?}")) +} + +pub fn to_zip_io_error(error: E) -> ZipError { + error!("Zip error: {error:?}"); + ZipError::Io(IOError::other(format!("{error:?}"))) +} diff --git a/packages/ui/api/stellar/src/utils/glob.rs b/packages/ui/api/stellar/src/utils/glob.rs new file mode 100644 index 000000000..939ce972a --- /dev/null +++ b/packages/ui/api/stellar/src/utils/glob.rs @@ -0,0 +1,28 @@ +use globset::{Error as GlobError, Glob, GlobSet, GlobSetBuilder}; + +#[derive(Debug)] +pub enum MatchError { + Glob(GlobError), + NoMatch(String), +} + +pub fn build_globset(patterns: Vec) -> Result { + patterns + .iter() + .map(|p| Glob::new(p)) + .collect::, _>>()? + .into_iter() + .fold(GlobSetBuilder::new(), |mut builder, glob| { + builder.add(glob); + builder + }) + .build() +} + +pub fn is_glob_match(matchers: &GlobSet, glob: &str) -> Result { + matchers + .matches(glob) + .first() + .copied() + .ok_or_else(|| MatchError::NoMatch(glob.to_string())) +} diff --git a/packages/ui/api/stellar/src/utils/mod.rs b/packages/ui/api/stellar/src/utils/mod.rs new file mode 100644 index 000000000..12ce93397 --- /dev/null +++ b/packages/ui/api/stellar/src/utils/mod.rs @@ -0,0 +1,8 @@ +mod errors; +pub use errors::*; +mod glob; +pub use glob::*; +mod path; +pub use path::*; +mod dir; +pub use dir::*; diff --git a/packages/ui/api/stellar/src/utils/path.rs b/packages/ui/api/stellar/src/utils/path.rs new file mode 100644 index 000000000..f5538895c --- /dev/null +++ b/packages/ui/api/stellar/src/utils/path.rs @@ -0,0 +1,99 @@ +use std::collections::HashSet; +use std::fs::{canonicalize, symlink_metadata}; +use std::io::{Error as IoError, ErrorKind as IoErrorKind, Result as IoResult}; +use std::path::{Component, Path, PathBuf}; + +pub fn canonicalize_existing_dir(dir: &Path) -> Result { + let can_path = canonicalize(dir).map_err(|e| { + if e.kind() == IoErrorKind::NotFound { + IoError::other("Directory does not exist") + } else { + e + } + })?; + + if !can_path.is_dir() { + return Err(IoError::other("destination is not a directory")); + } + + Ok(can_path) +} + +fn norm(s: &str) -> String { + let mut v = s.replace('\\', "/"); + if let Some(x) = v.strip_prefix("./") { + v = x.to_string(); + } + v +} + +fn ancestors_rel(p: &str) -> impl Iterator + '_ { + Path::new(p) + .ancestors() + .skip(1) // parents only, not the full path + .take_while(|a| !a.as_os_str().is_empty()) + .map(|a| a.components() + .filter(|c| !matches!(c, Component::CurDir)) + .collect::() + .to_string_lossy() + .into_owned()) +} + +pub fn expand_with_directories(patterns: &[&str]) -> Vec { + let set: HashSet = patterns + .iter() + .map(|p| norm(p)) + .flat_map(|p| { + let mut v = Vec::new(); + v.push(p.clone()); + for d in ancestors_rel(&p) { + v.push(d.clone()); + v.push(format!("{d}/")); + } + v + }) + .collect(); + set.into_iter().collect() +} + +pub fn join_and_assert_inside(root: &Path, rel: &Path) -> Result { + let full = root.join(rel); + if !full.starts_with(root) { + return Err(IoError::other("Path escape root")); + } + Ok(full) +} + +pub fn ensure_no_symlinks(root: &Path, path: &Path) -> IoResult<()> { + let rel = path + .strip_prefix(root) + .map_err(|_| IoError::other("path escapes root"))?; + + let parents = rel.parent().unwrap_or(Path::new("")); + + parents + .components() + .scan(root.to_path_buf(), |acc: &mut PathBuf, c| { + acc.push(c); + Some(acc.clone()) + }) + .try_for_each(|p| { + let ft = symlink_metadata(&p)?.file_type(); + if ft.is_symlink() { + Err(IoError::other("symlink detected")) + } else { + Ok(()) + } + })?; + + match std::fs::symlink_metadata(path) { + Ok(meta) if meta.file_type().is_symlink() => { + return Err(IoError::other("symlink detected")) + } + Err(e) if e.kind() == IoErrorKind::NotFound => {} + Err(e) => return Err(e), + _ => {} + } + + Ok(()) +} diff --git a/packages/ui/api/stellar/tests/environment/mod.rs b/packages/ui/api/stellar/tests/environment/mod.rs new file mode 100644 index 000000000..024a9d5b3 --- /dev/null +++ b/packages/ui/api/stellar/tests/environment/mod.rs @@ -0,0 +1 @@ +pub mod zip_folder; diff --git a/packages/ui/api/stellar/tests/environment/zip_folder.rs b/packages/ui/api/stellar/tests/environment/zip_folder.rs new file mode 100644 index 000000000..d117b0c9a --- /dev/null +++ b/packages/ui/api/stellar/tests/environment/zip_folder.rs @@ -0,0 +1,333 @@ +use std::fs::{create_dir_all, read_to_string, write}; +use std::path::PathBuf; + +use std::io::{Cursor, Write}; +use tempfile::tempdir; +use zip::result::ZipError; +use zip::{write::FileOptions, CompressionMethod, ZipArchive, ZipWriter}; + +use stellar_api::environment::{expected_entry_count, unzip_in_temporary_folder, zip_directory}; + +fn create_sample_directory() -> (tempfile::TempDir, PathBuf) { + let dir = tempdir().expect("Failed to create temp dir"); + let root = dir.path().to_path_buf(); + + // Create files and directories: + write(root.join("a.txt"), b"hello").expect("Failed to write a.txt"); + create_dir_all(root.join("dir1")).expect("Failed to create dir1"); + write(root.join("dir1").join("b.txt"), b"world").expect("Failed to write dir1/b.txt"); + + (dir, root) +} + +#[test] +fn test_returns_streaming_ndjson_response_with_headers() { + let (_dir, root) = create_sample_directory(); + + let zip_bytes = zip_directory(&root).expect("Failed to zip directory"); + + let extracted = unzip_in_temporary_folder(zip_bytes, &["a.txt", "dir1/b.txt"]) + .expect("Extraction should succeed"); + + let a_txt = read_to_string(extracted.path().join("a.txt")).expect("read a.txt"); + let b_txt = + read_to_string(extracted.path().join("dir1").join("b.txt")).expect("read dir1/b.txt"); + + assert_eq!(a_txt, "hello"); + assert_eq!(b_txt, "world"); + assert!(extracted.path().join("dir1").is_dir()); +} + +#[test] +fn test_builds_system_prompt_with_contract_context() { + // For files ["a.txt", "dir1/b.txt"], the expected entries are: + // - a.txt + // - dir1 + // - dir1/b.txt + // Total: 3 + let count = expected_entry_count(&["a.txt", "dir1/b.txt"]); + assert_eq!(count, 3); +} + +#[test] +fn test_persists_chat_on_successful_stream_completion() { + let dir = tempdir().expect("Failed to create temp dir"); + let root = dir.path(); + + // Create a file larger than the per-file limit (50 KB) + let big = vec![0u8; 60 * 1024]; // 60 KB + write(root.join("big.bin"), &big).expect("Failed to write big.bin"); + + let zip_bytes = zip_directory(root).expect("Failed to zip directory"); + + let result = unzip_in_temporary_folder(zip_bytes, &["big.bin"]); + match result { + Err(ZipError::UnsupportedArchive(msg)) => assert_eq!(msg, "entry too large"), + _ => panic!("Expected UnsupportedArchive(\"entry too large\"), got {result:?}"), + } +} + +#[test] +fn test_filters_out_messages_at_or_above500_chars() { + let dir = tempdir().expect("Failed to create temp dir"); + let root = dir.path(); + + // Highly compressible content below per-file limit to trigger suspicious compression ratio + let compressible = vec![b'A'; 49 * 1024]; // 49 KB of 'A's + write(root.join("compressible.txt"), &compressible).expect("Failed to write compressible.txt"); + + let zip_bytes = zip_directory(root).expect("Failed to zip directory"); + + let result = unzip_in_temporary_folder(zip_bytes, &["compressible.txt"]); + match result { + Err(ZipError::UnsupportedArchive(msg)) => assert_eq!(msg, "suspicious compression ratio"), + _ => { + panic!("Expected UnsupportedArchive(\"suspicious compression ratio\"), got {result:?}") + } + } +} + +#[test] +fn test_uses_empty_tools_for_unsupported_language() { + let (_dir, root) = create_sample_directory(); + + let zip_bytes = zip_directory(&root).expect("Failed to zip directory"); + + // Craft expected files that produce the same expected entry count (3) but do not match actual names + // Actual entries: a.txt, dir1, dir1/b.txt + // Provide: x.txt (1), y/z.txt and y (2) => total 3 + let result = unzip_in_temporary_folder(zip_bytes, &["x.txt", "y/z.txt"]); + match result { + Err(ZipError::UnsupportedArchive(msg)) => assert_eq!(msg, "Unexpected zip content"), + _ => panic!("Expected UnsupportedArchive(\"Unexpected zip content\"), got {result:?}"), + } +} + +#[test] +fn test_returns_error_json_on_request_parsing_failure() { + // Invalid zip data should fail to parse/extract + let invalid = vec![0u8, 1, 2, 3, 4, 5]; + let res = unzip_in_temporary_folder(invalid, &[]); + assert!(res.is_err(), "Expected error on invalid zip data"); +} + +#[test] +fn test_fails_when_entry_count_mismatch() { + let (_dir, root) = create_sample_directory(); + + let zip_bytes = zip_directory(&root).expect("Failed to zip directory"); + + // Only declare a subset of expected files so the entry count mismatches (actual: 3, expected: 1) + let result = unzip_in_temporary_folder(zip_bytes, &["a.txt"]); + match result { + Err(ZipError::UnsupportedArchive(msg)) => assert_eq!(msg, "Unexpected zip file"), + _ => panic!("Expected UnsupportedArchive(\"Unexpected zip file\"), got {result:?}"), + } +} + +#[test] +fn test_supports_stored_compression_method() { + // Build a ZIP with Stored (no compression) for entries: a.txt and dir1/b.txt plus dir1/ directory + let mut bytes = Vec::new(); + { + let cursor = Cursor::new(&mut bytes); + let mut writer = ZipWriter::new(cursor); + let options = FileOptions::<()>::default().compression_method(CompressionMethod::Stored); + + writer.add_directory("dir1/", options).expect("add dir1/"); + + writer.start_file("a.txt", options).expect("start a.txt"); + writer.write_all(b"hello").expect("write a.txt"); + + writer + .start_file("dir1/b.txt", options) + .expect("start dir1/b.txt"); + writer.write_all(b"world").expect("write dir1/b.txt"); + + writer.finish().expect("finish zip"); + } + + let extracted = unzip_in_temporary_folder(bytes, &["a.txt", "dir1/b.txt"]) + .expect("Extraction should succeed with Stored method"); + + let a_txt = read_to_string(extracted.path().join("a.txt")).expect("read a.txt"); + let b_txt = + read_to_string(extracted.path().join("dir1").join("b.txt")).expect("read dir1/b.txt"); + + assert_eq!(a_txt, "hello"); + assert_eq!(b_txt, "world"); +} + +#[test] +fn test_rejects_path_traversal_entries() { + // Build a ZIP that contains a path traversal entry ../evil.txt + let mut bytes = Vec::new(); + { + let cursor = Cursor::new(&mut bytes); + let mut writer = ZipWriter::new(cursor); + let options = FileOptions::<()>::default().compression_method(CompressionMethod::Stored); + + writer + .start_file("../evil.txt", options) + .expect("start ../evil.txt"); + writer.write_all(b"oops").expect("write ../evil.txt"); + writer.finish().expect("finish zip"); + } + + // Use expected files with matching count (1) to reach entry name validation + let result = unzip_in_temporary_folder(bytes, &["evil.txt"]); + match result { + Err(ZipError::Io(_)) => {} + _ => { + panic!("Expected ZipError::Io for invalid entry name (path traversal), got {result:?}") + } + } +} + +#[test] +fn test_rejects_archives_exceeding_total_uncompressed_size() { + // Build a ZIP with three 40KB files using Stored compression to avoid ratio checks + let mut bytes = Vec::new(); + { + let cursor = Cursor::new(&mut bytes); + let mut writer = ZipWriter::new(cursor); + let options = FileOptions::<()>::default().compression_method(CompressionMethod::Stored); + + let big = vec![0u8; 40 * 1024]; + for name in ["f1.bin", "f2.bin", "f3.bin"] { + writer.start_file(name, options).expect("start file"); + writer.write_all(&big).expect("write file"); + } + writer.finish().expect("finish zip"); + } + + let result = unzip_in_temporary_folder(bytes, &["f1.bin", "f2.bin", "f3.bin"]); + match result { + Err(ZipError::UnsupportedArchive(msg)) => assert_eq!(msg, "archive too large"), + _ => panic!("Expected UnsupportedArchive(\"archive too large\"), got {result:?}"), + } +} + +#[test] +fn test_allows_matching_with_glob_patterns() { + let (_dir, root) = create_sample_directory(); + + let zip_bytes = zip_directory(&root).expect("Failed to zip directory"); + + // Allow any .txt in dir1 plus a.txt at root + let extracted = unzip_in_temporary_folder(zip_bytes, &["a.txt", "dir1/*.txt"]) + .expect("Extraction should succeed with glob patterns"); + + let a_txt = read_to_string(extracted.path().join("a.txt")).expect("read a.txt"); + let b_txt = + read_to_string(extracted.path().join("dir1").join("b.txt")).expect("read dir1/b.txt"); + + assert_eq!(a_txt, "hello"); + assert_eq!(b_txt, "world"); +} + +#[test] +fn test_normalizes_backslashes_in_entry_names() { + let dir = tempdir().expect("Failed to create temp dir"); + let root = dir.path(); + + // Create a file whose name contains a backslash character + // On Unix, backslash is a normal character; normalize_path should convert it to "/" + write(root.join("dir1\\b.txt"), b"content").expect("write file with backslash in name"); + + let zip_bytes = zip_directory(root).expect("Failed to zip directory"); + + // Inspect the zip entries directly and assert the normalized forward slash path exists + let cursor = Cursor::new(zip_bytes); + let mut archive = ZipArchive::new(cursor).expect("open zip"); + + let mut found = false; + for i in 0..archive.len() { + let entry = archive.by_index(i).expect("entry"); + if !entry.is_dir() && entry.name() == "dir1/b.txt" { + found = true; + } + } + assert!(found, "expected to find normalized entry 'dir1/b.txt'"); +} + +#[test] +fn test_zip_directory_uses_deflated_compression_for_files() { + let (_dir, root) = create_sample_directory(); + + let zip_bytes = zip_directory(&root).expect("Failed to zip directory"); + + let cursor = Cursor::new(zip_bytes); + let mut archive = ZipArchive::new(cursor).expect("Open zip"); + for i in 0..archive.len() { + let entry = archive.by_index(i).expect("entry"); + if entry.is_dir() { + continue; + } + assert_eq!( + entry.compression(), + CompressionMethod::Deflated, + "files should use Deflated compression by default" + ); + } +} + +#[test] +fn test_rejects_absolute_path_entries() { + // Build a zip that contains an absolute path entry /abs.txt + let mut bytes = Vec::new(); + { + let cursor = Cursor::new(&mut bytes); + let mut writer = ZipWriter::new(cursor); + let options = FileOptions::<()>::default().compression_method(CompressionMethod::Stored); + + // Use an absolute path to trigger invalid entry name via enclosed_name + writer + .start_file("/abs.txt", options) + .expect("start /abs.txt"); + writer.write_all(b"evil").expect("write /abs.txt"); + + writer.finish().expect("finish zip"); + } + + // Use an expected list that matches the entry count (1) + let result = unzip_in_temporary_folder(bytes, &["abs.txt"]); + match result { + Err(ZipError::Io(_)) => {} + _ => panic!("Expected ZipError::Io for invalid absolute entry name, got {result:?}"), + } +} + +#[test] +fn test_extracts_nested_file_and_preserves_directory_structure() { + // Build a zip that includes the directory entry and a nested file + let mut bytes = Vec::new(); + { + let cursor = Cursor::new(&mut bytes); + let mut writer = ZipWriter::new(cursor); + let options = FileOptions::<()>::default().compression_method(CompressionMethod::Stored); + + writer + .add_directory("nested/", options) + .expect("add nested/"); + writer + .start_file("nested/inner.txt", options) + .expect("start nested/inner.txt"); + writer + .write_all(b"content") + .expect("write nested/inner.txt"); + + writer.finish().expect("finish zip"); + } + + // Expect exactly two entries: nested/ and nested/inner.txt + let extracted = unzip_in_temporary_folder(bytes, &["nested/inner.txt"]).expect("extract"); + let content = read_to_string(extracted.path().join("nested").join("inner.txt")) + .expect("read nested/inner.txt"); + + assert_eq!(content, "content"); + assert!( + extracted.path().join("nested").is_dir(), + "parent directory should exist after extraction" + ); +} diff --git a/packages/ui/api/stellar/tests/routes/health.rs b/packages/ui/api/stellar/tests/routes/health.rs new file mode 100644 index 000000000..9a08290a9 --- /dev/null +++ b/packages/ui/api/stellar/tests/routes/health.rs @@ -0,0 +1,15 @@ +use actix_web::{test, App}; +use stellar_api::routes::health::init; + +#[actix_web::test] +async fn test_health_endpoint() { + let app = test::init_service(App::new().configure(init)).await; + + let req = test::TestRequest::get().uri("/health").to_request(); + let resp = test::call_service(&app, req).await; + + assert!(resp.status().is_success()); + + let body = test::read_body(resp).await; + assert_eq!(body, "OK"); +} diff --git a/packages/ui/api/stellar/tests/routes/mod.rs b/packages/ui/api/stellar/tests/routes/mod.rs new file mode 100644 index 000000000..43a7c768a --- /dev/null +++ b/packages/ui/api/stellar/tests/routes/mod.rs @@ -0,0 +1 @@ +pub mod health; diff --git a/packages/ui/api/stellar/tests/tests_paths.rs b/packages/ui/api/stellar/tests/tests_paths.rs new file mode 100644 index 000000000..28dfbdf95 --- /dev/null +++ b/packages/ui/api/stellar/tests/tests_paths.rs @@ -0,0 +1,8 @@ +#[path = "environment/mod.rs"] +mod environment; + +#[path = "routes/mod.rs"] +mod routes; + +#[path = "utils/mod.rs"] +mod utils; diff --git a/packages/ui/api/stellar/tests/utils/glob.rs b/packages/ui/api/stellar/tests/utils/glob.rs new file mode 100644 index 000000000..a6e960353 --- /dev/null +++ b/packages/ui/api/stellar/tests/utils/glob.rs @@ -0,0 +1,70 @@ +use stellar_api::utils::{build_globset, is_glob_match}; + +#[test] +fn test_single_pattern_match() { + let globset = build_globset(vec!["*.rs".to_string()]).unwrap(); + let matcher = globset.matches("main.rs"); + assert!(!matcher.is_empty()); +} + +#[test] +fn test_single_pattern_no_match() { + let globset = build_globset(vec!["*.rs".to_string()]).unwrap(); + let matcher = globset.matches("main.txt"); + assert!(matcher.is_empty()); +} + +#[test] +fn test_multiple_patterns_match() { + let globset = build_globset(vec!["*.rs".to_string(), "*.txt".to_string()]).unwrap(); + assert!(globset.is_match("lib.rs")); + assert!(globset.is_match("readme.txt")); + assert!(!globset.is_match("image.png")); +} + +#[test] +fn test_empty_patterns() { + let globset = build_globset(Vec::::new()).unwrap(); + assert!(!globset.is_match("main.rs")); +} + +#[test] +fn test_invalid_pattern() { + let result = build_globset(vec!["[invalid".to_string()]); + assert!(result.is_err()); +} + +#[test] +fn test_directory_pattern() { + let globset = build_globset(vec!["src/*".to_string()]).unwrap(); + assert!(globset.is_match("src/main.rs")); + assert!(!globset.is_match("tests/main.rs")); +} + +#[test] +fn test_question_mark_pattern() { + let globset = build_globset(vec!["file?.rs".to_string()]).unwrap(); + assert!(globset.is_match("file1.rs")); + assert!(globset.is_match("fileA.rs")); + assert!(!globset.is_match("file10.rs")); +} + +#[test] +fn test_is_glob_match_success() { + let globset = build_globset(vec!["*.rs".to_string(), "*.txt".to_string()]).unwrap(); + let result = is_glob_match(&globset, "main.rs"); + assert!(matches!(result, Ok(0))); +} + +#[test] +fn test_is_glob_match_no_match() { + let globset = build_globset(vec!["*.rs".to_string(), "*.txt".to_string()]).unwrap(); + let result = is_glob_match(&globset, "image.png"); + assert!(result.is_err()); +} + +#[test] +fn test_is_glob_match_invalid_pattern() { + let globset = build_globset(vec!["[invalid".to_string()]); + assert!(globset.is_err()); +} diff --git a/packages/ui/api/stellar/tests/utils/mod.rs b/packages/ui/api/stellar/tests/utils/mod.rs new file mode 100644 index 000000000..9ee2e9707 --- /dev/null +++ b/packages/ui/api/stellar/tests/utils/mod.rs @@ -0,0 +1 @@ +pub mod glob; diff --git a/packages/ui/package.json b/packages/ui/package.json index 4f9e29ce2..8e99f9d17 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -5,9 +5,10 @@ "scripts": { "prepare": "echo \"Nothing to prepare\"", "build": "node scripts/copy-versions.mjs && rollup -c", - "type:check:api": "deno task --config deno.json type:check", + "type:check:api": "deno task --config ./api/ai/deno.json type:check", "dev": "node scripts/copy-versions.mjs && rollup -c -w", - "dev:api": "ENV=dev deno task dev", + "dev:api": "cd api && docker-compose up", + "dev:api:build": "cd api && docker-compose up --build", "start": "sirv public", "validate": "svelte-check", "test": "ava" diff --git a/packages/ui/public/index.html b/packages/ui/public/index.html index 2a61b50fa..38fa53f36 100644 --- a/packages/ui/public/index.html +++ b/packages/ui/public/index.html @@ -112,7 +112,7 @@
- + Try the UI Builder up-right-from-square diff --git a/packages/ui/public/stellar.html b/packages/ui/public/stellar.html index c2d355f4f..857917bd4 100644 --- a/packages/ui/public/stellar.html +++ b/packages/ui/public/stellar.html @@ -62,12 +62,30 @@
+ +
diff --git a/packages/ui/src/stylus/App.svelte b/packages/ui/src/stylus/App.svelte index 438009636..17b1991c7 100644 --- a/packages/ui/src/stylus/App.svelte +++ b/packages/ui/src/stylus/App.svelte @@ -28,7 +28,7 @@ import { injectHyperlinks } from './inject-hyperlinks'; import type { InitialOptions } from '../common/initial-options'; import { createWiz, mergeAiAssistanceOptions } from '../common/Wiz.svelte'; - import type { AiFunctionCall } from '../../api/ai-assistant/types/assistant'; + import type { AiFunctionCall } from '../../api/ai/ai-assistant/types/assistant'; const dispatch = createEventDispatcher(); From 5e28762ce42c0edd14e6cac487ec70b0a59adf73 Mon Sep 17 00:00:00 2001 From: collins-w Date: Wed, 19 Nov 2025 17:46:00 +0300 Subject: [PATCH 02/22] chore: trigger staging build --- .github/workflows/docker-stg.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index 2f9fc4a0e..cd4cf64ce 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -4,7 +4,7 @@ name: (Staging) Build and Deploy on: push: - branches: [main] + branches: [main,stellar-scaffold] workflow_dispatch: inputs: branch: From 68a963521b44e722f015a6535c66af5a2db66c1c Mon Sep 17 00:00:00 2001 From: collins-w Date: Wed, 19 Nov 2025 19:47:04 +0300 Subject: [PATCH 03/22] chore: fix docker context --- .github/workflows/docker-stg.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index cd4cf64ce..deb03d529 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -84,8 +84,8 @@ jobs: uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 id: push with: - context: packages/ui/api/stellar - file: Dockerfile.prod + context: ./contracts-wizard + file: ./contracts-wizard/packages/ui/api/stellar/Dockerfile.prod platforms: linux/arm64 push: true tags: | From 4cf8f0a6b16f72215a69b2b68bb0988e6635eade Mon Sep 17 00:00:00 2001 From: collins-w Date: Wed, 19 Nov 2025 20:15:20 +0300 Subject: [PATCH 04/22] chore: fix docker context --- .github/workflows/docker-stg.yaml | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index deb03d529..a84457d97 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -55,37 +55,12 @@ jobs: - name: Login to Amazon ECR uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 - - name: Build Stellar API Docker image - uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 - id: build - with: - context: ./packages/ui/api/stellar - platforms: linux/amd64 # linux/arm64 causes anchore/scan-action to fail - tags: | - ${{ env.REGISTRY }}/wizard-api-stg:latest - ${{ env.REGISTRY }}/wizard-api-stg:${{ github.sha }} - cache-from: type=gha - cache-to: type=gha,mode=max - load: true - - - name: Scan Stellar API Docker image - uses: anchore/scan-action@df395807f4554463d4455b8047cf58e37b6acaae # v6.5.0 - id: scan - with: - image: ${{ env.REGISTRY }}/wizard-stellar-api-stg:${{ github.sha }} - fail-build: false - - - name: Upload Anchore scan SARIF report - uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5 - with: - sarif_file: ${{ steps.scan.outputs.sarif }} - - name: Build and push Stellar API Docker image uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 id: push with: - context: ./contracts-wizard - file: ./contracts-wizard/packages/ui/api/stellar/Dockerfile.prod + context: ./packages/ui/api/stellar + file: Dockerfile.prod platforms: linux/arm64 push: true tags: | From 0070c7bfca5ce1d51fd379758376a8021429fed3 Mon Sep 17 00:00:00 2001 From: collins-w Date: Wed, 19 Nov 2025 20:23:07 +0300 Subject: [PATCH 05/22] chore: fix docker context --- .github/workflows/docker-stg.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index a84457d97..562181439 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -59,8 +59,8 @@ jobs: uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 id: push with: - context: ./packages/ui/api/stellar - file: Dockerfile.prod + context: ./contracts-wizard/packages/ui/api/stellar + file: ./contracts-wizard/packages/ui/api/stellar/Dockerfile.prod platforms: linux/arm64 push: true tags: | From 0b1c8c4d275b428518c08153986ada25e8a10b06 Mon Sep 17 00:00:00 2001 From: collins-w Date: Wed, 19 Nov 2025 20:26:42 +0300 Subject: [PATCH 06/22] chore: fix docker context --- .github/workflows/docker-stg.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index 562181439..a0f6740d8 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -59,8 +59,8 @@ jobs: uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 id: push with: - context: ./contracts-wizard/packages/ui/api/stellar - file: ./contracts-wizard/packages/ui/api/stellar/Dockerfile.prod + context: ./packages/ui/api/stellar + file: ./packages/ui/api/stellar/Dockerfile.prod platforms: linux/arm64 push: true tags: | From 6accf2ba14a329e5f996e49778e9705b5e0b3b3a Mon Sep 17 00:00:00 2001 From: collins-w Date: Thu, 20 Nov 2025 08:15:12 +0300 Subject: [PATCH 07/22] chore: build amd64 --- .github/workflows/docker-stg.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index a0f6740d8..bdd298f35 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -61,7 +61,7 @@ jobs: with: context: ./packages/ui/api/stellar file: ./packages/ui/api/stellar/Dockerfile.prod - platforms: linux/arm64 + platforms: linux/amd64 push: true tags: | ${{ env.REGISTRY }}/wizard-stellar-api-stg:latest From 389d3298781417d0f99a5380069195b803dedc97 Mon Sep 17 00:00:00 2001 From: collins-w Date: Thu, 20 Nov 2025 10:06:01 +0300 Subject: [PATCH 08/22] chore: update the ecr image --- .github/workflows/docker-stg.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index bdd298f35..bbee78696 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -64,8 +64,8 @@ jobs: platforms: linux/amd64 push: true tags: | - ${{ env.REGISTRY }}/wizard-stellar-api-stg:latest - ${{ env.REGISTRY }}/wizard-stellar-api-stg:${{ github.sha }} + ${{ env.REGISTRY }}/wizard-api-stg:latest + ${{ env.REGISTRY }}/wizard-api-stg:${{ github.sha }} cache-from: type=gha cache-to: type=gha,mode=max From 27cb5e246934a6b28a08febb01cadb0fadd8525d Mon Sep 17 00:00:00 2001 From: collins-w Date: Thu, 20 Nov 2025 14:11:54 +0300 Subject: [PATCH 09/22] chore: update and trigger the prod workflow --- .github/workflows/docker-prod.yaml | 49 ++++++------------------------ .github/workflows/docker-stg.yaml | 7 +---- 2 files changed, 10 insertions(+), 46 deletions(-) diff --git a/.github/workflows/docker-prod.yaml b/.github/workflows/docker-prod.yaml index 555f44248..3433e80df 100644 --- a/.github/workflows/docker-prod.yaml +++ b/.github/workflows/docker-prod.yaml @@ -1,10 +1,9 @@ -# This workflow runs whenever a release is created. -# The image is tagged with latest and the release version. name: (Production) Build and Deploy on: - release: - types: [published] + push: + branches: [stellar-scaffold] + workflow_dispatch: permissions: contents: read @@ -19,9 +18,9 @@ jobs: attestations: write security-events: write env: - REGISTRY: ${{ secrets.RESEARCH_ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com - ROLE_FOR_OIDC: 'arn:aws:iam::${{ secrets.ROOT_ACCOUNT_ID }}:role/github-actions-research-account-oidc-role' - ROLE_TO_ASSUME: 'arn:aws:iam::${{ secrets.RESEARCH_ACCOUNT_ID }}:role/GithubOIDCResearchAccountRole' + REGISTRY: ${{ vars.DOCKER_REGISTRY }} + ROLE_FOR_OIDC: "${{ secrets.ROLE_FOR_OIDC }}" + ROLE_TO_ASSUME: "${{ secrets.ROLE_TO_ASSUME }}" steps: - name: Harden the runner (Audit all outbound calls) uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 @@ -45,11 +44,6 @@ jobs: with: token: ${{ steps.gh-app-token.outputs.token }} - - name: Set up QEMU - uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 - with: - platforms: 'arm64' - - name: Set up Docker Buildx uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 @@ -62,38 +56,13 @@ jobs: - name: Login to Amazon ECR uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 - - name: Build Stellar API Docker image - uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 - id: build - with: - context: . - platforms: linux/amd64 # linux/arm64 causes anchore/scan-action to fail - tags: | - ${{ env.REGISTRY }}/wizard-stellar-api-prod:latest - ${{ env.REGISTRY }}/wizard-stellar-api-prod:${{ github.sha }} - cache-from: type=gha - cache-to: type=gha,mode=max - load: true - - - name: Scan Stellar API Docker image - uses: anchore/scan-action@df395807f4554463d4455b8047cf58e37b6acaae # v6.5.0 - id: scan - with: - image: ${{ env.REGISTRY }}/wizard-stellar-api-prod:${{ github.sha }} - fail-build: false - - - name: Upload Anchore scan SARIF report - uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5 - with: - sarif_file: ${{ steps.scan.outputs.sarif }} - - name: Build and push Stellar API Docker image uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0 id: push with: - context: packages/ui/api/stellar - file: Dockerfile.prod - platforms: linux/arm64 + context: ./packages/ui/api/stellar + file: ./packages/ui/api/stellar/Dockerfile.prod + platforms: linux/amd64 push: true tags: | ${{ env.REGISTRY }}/wizard-api-prod:latest diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index bbee78696..b8313b4b8 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -38,11 +38,6 @@ jobs: - name: Checkout code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Set up QEMU - uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 - with: - platforms: 'arm64' - - name: Set up Docker Buildx uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 @@ -77,7 +72,7 @@ jobs: ROLE_TO_ASSUME: "${{ secrets.ROLE_TO_ASSUME }}" ECS_CLUSTER: ${{ vars.ECS_STG_CLUSTER }} ECS_SERVICE: ${{ vars.ECS_STG_SERVICE }} - AWS_REGION: ${{ vars.REGION }} + AWS_REGION: ${{ vars.AWS_REGION }} permissions: contents: read id-token: write From beb0633d2d336ad66746f4df3c97eac7967830aa Mon Sep 17 00:00:00 2001 From: collins-w Date: Mon, 24 Nov 2025 08:00:56 +0300 Subject: [PATCH 10/22] chore: fix the prod workflow --- .github/workflows/docker-prod.yaml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/docker-prod.yaml b/.github/workflows/docker-prod.yaml index 3433e80df..c7e9cf39c 100644 --- a/.github/workflows/docker-prod.yaml +++ b/.github/workflows/docker-prod.yaml @@ -27,22 +27,8 @@ jobs: with: egress-policy: audit - - uses: actions/create-github-app-token@af35edadc00be37caa72ed9f3e6d5f7801bfdf09 # v1.11.7 - id: gh-app-token - with: - app-id: ${{ vars.GH_APP_ID }} - private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} - - name: Checkout Repo uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - token: ${{ steps.gh-app-token.outputs.token }} - fetch-depth: 0 - - - name: Setup pre-requisites - uses: ./.github/actions/setup - with: - token: ${{ steps.gh-app-token.outputs.token }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 From 42ba098887406b4872eaf55ad6921a8ccd3cfb64 Mon Sep 17 00:00:00 2001 From: collins-w Date: Mon, 24 Nov 2025 10:41:07 +0300 Subject: [PATCH 11/22] chore: clean up deploy workflows --- .github/workflows/docker-prod.yaml | 2 -- .github/workflows/docker-stg.yaml | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/docker-prod.yaml b/.github/workflows/docker-prod.yaml index c7e9cf39c..ec0fbaae3 100644 --- a/.github/workflows/docker-prod.yaml +++ b/.github/workflows/docker-prod.yaml @@ -1,8 +1,6 @@ name: (Production) Build and Deploy on: - push: - branches: [stellar-scaffold] workflow_dispatch: permissions: diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index b8313b4b8..d97a2043d 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -1,10 +1,8 @@ -# This workflow runs whenever a release is created. -# The image is tagged with latest and the release version. name: (Staging) Build and Deploy on: push: - branches: [main,stellar-scaffold] + branches: [main] workflow_dispatch: inputs: branch: From ab52ec4563e71d5bafaaea176bf25550c1daae24 Mon Sep 17 00:00:00 2001 From: collins-w Date: Mon, 24 Nov 2025 10:43:31 +0300 Subject: [PATCH 12/22] chore: automatically deploy to staging when merged to the master branch --- .github/workflows/docker-stg.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index d97a2043d..62034915e 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -2,13 +2,13 @@ name: (Staging) Build and Deploy on: push: - branches: [main] + branches: [master] workflow_dispatch: inputs: branch: description: 'Branch to build from' required: true - default: 'main' + default: 'master' type: string permissions: From b9fa9a3f37f74968e91acfeda72ef0812d938c64 Mon Sep 17 00:00:00 2001 From: collins-w Date: Mon, 24 Nov 2025 10:49:32 +0300 Subject: [PATCH 13/22] chore: automatically deploy to staging when changes in packages/ui/api folder --- .github/workflows/docker-stg.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index 62034915e..60475c123 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -3,6 +3,8 @@ name: (Staging) Build and Deploy on: push: branches: [master] + paths: + - 'packages/ui/api/**' workflow_dispatch: inputs: branch: From 1059ac425bde9f26267d4a2c053eeafcd9257521 Mon Sep 17 00:00:00 2001 From: Cove Marquis-Bortoli <44323490+CoveMB@users.noreply.github.com> Date: Thu, 4 Dec 2025 10:01:11 -0500 Subject: [PATCH 14/22] Stellar scafold fargate backend coverage (#746) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Eric Lau Co-authored-by: collins-w Co-authored-by: https://x.com/rafaelKO76 Co-authored-by: Ruslan <56787163+typicalHuman@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ernesto García --- .early.coverage/v8/coverage-final.json | 1 - .github/actions/prepare/action.yml | 22 ++ .github/workflows/test.yml | 86 +++++- .gitignore | 5 +- .prettierignore | 5 +- codecov.yml | 34 +++ packages/ui/api/ai/deno.lock | 256 +----------------- packages/ui/api/stellar/Cargo.lock | 149 ++++++++-- packages/ui/api/stellar/Cargo.toml | 4 + .../src/controllers/upgrade_scaffold.rs | 11 - packages/ui/api/stellar/tests/config/mod.rs | 1 + .../ui/api/stellar/tests/config/server.rs | 55 ++++ .../ui/api/stellar/tests/controllers/mod.rs | 1 + .../tests/controllers/upgrade_scaffold.rs | 202 ++++++++++++++ .../ui/api/stellar/tests/environment/mod.rs | 1 + .../tests/environment/scaffold_upgrade.rs | 181 +++++++++++++ .../stellar/tests/environment/zip_folder.rs | 202 ++++++++++++-- packages/ui/api/stellar/tests/routes/mod.rs | 1 + .../ui/api/stellar/tests/routes/routes.rs | 28 ++ .../stellar/tests/routes/upgrade_scaffold.rs | 138 ++++++++++ packages/ui/api/stellar/tests/tests_paths.rs | 6 + packages/ui/api/stellar/tests/utils/dir.rs | 37 +++ packages/ui/api/stellar/tests/utils/errors.rs | 20 ++ packages/ui/api/stellar/tests/utils/glob.rs | 21 +- packages/ui/api/stellar/tests/utils/mod.rs | 3 + packages/ui/api/stellar/tests/utils/path.rs | 115 ++++++++ packages/ui/src/common/Wiz.svelte | 16 +- packages/ui/src/solidity/overrides.ts | 2 +- 28 files changed, 1276 insertions(+), 327 deletions(-) delete mode 100644 .early.coverage/v8/coverage-final.json create mode 100644 .github/actions/prepare/action.yml create mode 100644 codecov.yml create mode 100644 packages/ui/api/stellar/tests/config/mod.rs create mode 100644 packages/ui/api/stellar/tests/config/server.rs create mode 100644 packages/ui/api/stellar/tests/controllers/mod.rs create mode 100644 packages/ui/api/stellar/tests/controllers/upgrade_scaffold.rs create mode 100644 packages/ui/api/stellar/tests/environment/scaffold_upgrade.rs create mode 100644 packages/ui/api/stellar/tests/routes/routes.rs create mode 100644 packages/ui/api/stellar/tests/routes/upgrade_scaffold.rs create mode 100644 packages/ui/api/stellar/tests/utils/dir.rs create mode 100644 packages/ui/api/stellar/tests/utils/errors.rs create mode 100644 packages/ui/api/stellar/tests/utils/path.rs diff --git a/.early.coverage/v8/coverage-final.json b/.early.coverage/v8/coverage-final.json deleted file mode 100644 index 0967ef424..000000000 --- a/.early.coverage/v8/coverage-final.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/.github/actions/prepare/action.yml b/.github/actions/prepare/action.yml new file mode 100644 index 000000000..0107a3787 --- /dev/null +++ b/.github/actions/prepare/action.yml @@ -0,0 +1,22 @@ +--- +name: Cache +description: Caches cargo dependencies +inputs: + components: + description: Additional Rust components to install (comma separated). rustfmt and clippy are always included. + required: false + default: '' +outputs: + cache-hit: + description: Cache Hit + value: ${{ steps.cache.outputs.cache-hit }} +runs: + using: composite + steps: + - name: setup rust tool chain + uses: dtolnay/rust-toolchain@1.88.0 # v1.88.0 + with: + components: ${{ (inputs.components != '') && format('{0}, rustfmt, clippy', inputs.components) || 'rustfmt, clippy' }} + - name: Restore cargo dependencies from cache + uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7 + id: cache diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 30649067a..d713089be 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: Test on: push: - branches: [master] + branches: [master, stellar-scafold-fargate-backend, stellar-scafold] pull_request: {} jobs: @@ -24,7 +24,7 @@ jobs: - name: Set up Deno 1.46.3 (matching Netlify edge function environment) uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3 with: - deno-version: '1.46.3' + deno-version: "1.46.3" - name: Set up environment uses: ./.github/actions/setup - name: Deno check API @@ -50,6 +50,84 @@ jobs: run: yarn test working-directory: packages/ui + stellar-backend: + runs-on: ubuntu-latest + defaults: + run: + working-directory: packages/ui/api/stellar + steps: + # Checkout the repository + - name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 + with: + egress-policy: audit + - name: Checkout Code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: free disk space + run: | + sudo swapoff -a + sudo rm -f /swapfile + sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc + sudo apt clean + if [[ $(docker image ls -aq) ]]; then + docker rmi $(docker image ls -aq) + else + echo "No Docker images found to remove" + fi + - name: Prepare + id: init + uses: ./.github/actions/prepare + with: + components: llvm-tools-preview + + # Get the output of the prepare composite action + - name: Get cache-hit output + run: 'echo "Cache hit >>>>>: ${{ steps.init.outputs.cache-hit }}"' + - name: Install cargo hack and cargo-llvm-cov + uses: taiki-e/install-action@a24ba45235ed716ff76646268742990dc9458860 # v2.62.42 + with: + tool: cargo-hack,cargo-llvm-cov + - name: Build + run: cargo test --no-run --locked + + - name: Run Developer Tests (excluding AI) and Generate Coverage Report + id: dev_coverage + env: + LLVM_PROFILE_FILE: stellar-backend-dev-%p-%m.profraw + RUSTFLAGS: -Cinstrument-coverage + RUST_TEST_THREADS: 1 + run: | + cargo hack llvm-cov --locked --lib --lcov --output-path stellar-backend-dev-lcov.info --tests -- --skip ai_ + + - name: Upload Developer Coverage to Codecov + uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + working-directory: packages/ui/api/stellar + name: stellar-backend-dev-coverage + files: stellar-backend-dev-lcov.info + flags: stellar-backend-dev + fail_ci_if_error: true + + - name: Run AI Tests and Generate Coverage Report + id: ai_coverage + env: + LLVM_PROFILE_FILE: stellar-backend-ai-%p-%m.profraw + RUSTFLAGS: -Cinstrument-coverage + RUST_TEST_THREADS: 1 + run: | + cargo hack llvm-cov --locked --lib --lcov --output-path stellar-backend-ai-lcov.info --tests -- ai_ + + - name: Upload AI Coverage to Codecov + uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + working-directory: packages/ui/api/stellar + name: stellar-backend-ai-coverage + files: stellar-backend-ai-lcov.info + flags: stellar-backend-ai + fail_ci_if_error: true + build: name: build (${{ matrix.package }}, ${{ matrix.variant }}) timeout-minutes: 90 @@ -71,13 +149,12 @@ jobs: variant: compile - package: stylus variant: compile - runs-on: ubuntu-latest steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: - fetch-depth: 0 + fetch-depth: 0 - name: Set up environment uses: ./.github/actions/setup @@ -103,7 +180,6 @@ jobs: target/ key: cargo-${{ matrix.package }} - - name: Set up rust toolchain if: matrix.package == 'stellar' && matrix.variant == 'compile' uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1.15.2 diff --git a/.gitignore b/.gitignore index fb2be9502..0d13b2f6e 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,7 @@ node_modules # Generated by Cargo # will have compiled files and executables debug/ -target/ \ No newline at end of file +target/ + +**/*.profraw +**/*lcov* \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 5ef2de522..22e34939b 100644 --- a/.prettierignore +++ b/.prettierignore @@ -16,4 +16,7 @@ public/ remappings.txt *.cairo *.sh -*.rs \ No newline at end of file +*.rs +**/Dockerfile* +*.yml +*.yaml \ No newline at end of file diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..6b57d3e4d --- /dev/null +++ b/codecov.yml @@ -0,0 +1,34 @@ +# coverage: +# precision: 2 +# round: down +# range: 70..100 + +# status: +# project: +# default: +# target: 85% +# threshold: 2% +# patch: +# default: +# target: auto +# threshold: 1% + +# flags: +# stellar-backend-ai: +# paths: +# - "packages/ui/api/stellar/src/" +# carryforward: true + +# stellar-backend-dev: +# paths: +# - "packages/ui/api/stellar/src/" +# carryforward: true + +# comment: +# layout: "flags, diff, files" +# require_changes: false +# behavior: default + +# ignore: +# - "**/tests/*" +# - "**/target/*" \ No newline at end of file diff --git a/packages/ui/api/ai/deno.lock b/packages/ui/api/ai/deno.lock index 5e453a785..d1459b48c 100644 --- a/packages/ui/api/ai/deno.lock +++ b/packages/ui/api/ai/deno.lock @@ -1,261 +1,7 @@ { "version": "3", - "redirects": { - "https://deno.land/std/fmt/colors.ts": "https://deno.land/std@0.224.0/fmt/colors.ts", -<<<<<<< HEAD:packages/ui/api/ai/deno.lock - "https://deno.land/std/path/mod.ts": "https://deno.land/std@0.224.0/path/mod.ts" -======= - "https://deno.land/std/path/mod.ts": "https://deno.land/std@0.224.0/path/mod.ts", - "https://esm.sh/crypto-js@^4.2.0/enc-hex?target=denonext": "https://esm.sh/crypto-js@4.2.0/enc-hex?target=denonext", - "https://esm.sh/crypto-js@^4.2.0/sha1?target=denonext": "https://esm.sh/crypto-js@4.2.0/sha1?target=denonext", - "https://esm.sh/uncrypto@^0.1.3?target=denonext": "https://esm.sh/uncrypto@0.1.3?target=denonext" ->>>>>>> upstream/master:packages/ui/deno.lock - }, "remote": { - "https://deno.land/std@0.224.0/assert/assert.ts": "09d30564c09de846855b7b071e62b5974b001bb72a4b797958fe0660e7849834", - "https://deno.land/std@0.224.0/assert/assertion_error.ts": "ba8752bd27ebc51f723702fac2f54d3e94447598f54264a6653d6413738a8917", - "https://deno.land/std@0.224.0/fmt/colors.ts": "508563c0659dd7198ba4bbf87e97f654af3c34eb56ba790260f252ad8012e1c5", - "https://deno.land/std@0.224.0/path/_common/assert_path.ts": "dbdd757a465b690b2cc72fc5fb7698c51507dec6bfafce4ca500c46b76ff7bd8", - "https://deno.land/std@0.224.0/path/_common/basename.ts": "569744855bc8445f3a56087fd2aed56bdad39da971a8d92b138c9913aecc5fa2", - "https://deno.land/std@0.224.0/path/_common/common.ts": "ef73c2860694775fe8ffcbcdd387f9f97c7a656febf0daa8c73b56f4d8a7bd4c", - "https://deno.land/std@0.224.0/path/_common/constants.ts": "dc5f8057159f4b48cd304eb3027e42f1148cf4df1fb4240774d3492b5d12ac0c", - "https://deno.land/std@0.224.0/path/_common/dirname.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", - "https://deno.land/std@0.224.0/path/_common/format.ts": "92500e91ea5de21c97f5fe91e178bae62af524b72d5fcd246d6d60ae4bcada8b", - "https://deno.land/std@0.224.0/path/_common/from_file_url.ts": "d672bdeebc11bf80e99bf266f886c70963107bdd31134c4e249eef51133ceccf", - "https://deno.land/std@0.224.0/path/_common/glob_to_reg_exp.ts": "6cac16d5c2dc23af7d66348a7ce430e5de4e70b0eede074bdbcf4903f4374d8d", - "https://deno.land/std@0.224.0/path/_common/normalize.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", - "https://deno.land/std@0.224.0/path/_common/normalize_string.ts": "33edef773c2a8e242761f731adeb2bd6d683e9c69e4e3d0092985bede74f4ac3", - "https://deno.land/std@0.224.0/path/_common/relative.ts": "faa2753d9b32320ed4ada0733261e3357c186e5705678d9dd08b97527deae607", - "https://deno.land/std@0.224.0/path/_common/strip_trailing_separators.ts": "7024a93447efcdcfeaa9339a98fa63ef9d53de363f1fbe9858970f1bba02655a", - "https://deno.land/std@0.224.0/path/_common/to_file_url.ts": "7f76adbc83ece1bba173e6e98a27c647712cab773d3f8cbe0398b74afc817883", - "https://deno.land/std@0.224.0/path/_interface.ts": "8dfeb930ca4a772c458a8c7bbe1e33216fe91c253411338ad80c5b6fa93ddba0", - "https://deno.land/std@0.224.0/path/_os.ts": "8fb9b90fb6b753bd8c77cfd8a33c2ff6c5f5bc185f50de8ca4ac6a05710b2c15", - "https://deno.land/std@0.224.0/path/basename.ts": "7ee495c2d1ee516ffff48fb9a93267ba928b5a3486b550be73071bc14f8cc63e", - "https://deno.land/std@0.224.0/path/common.ts": "03e52e22882402c986fe97ca3b5bb4263c2aa811c515ce84584b23bac4cc2643", - "https://deno.land/std@0.224.0/path/constants.ts": "0c206169ca104938ede9da48ac952de288f23343304a1c3cb6ec7625e7325f36", - "https://deno.land/std@0.224.0/path/dirname.ts": "85bd955bf31d62c9aafdd7ff561c4b5fb587d11a9a5a45e2b01aedffa4238a7c", - "https://deno.land/std@0.224.0/path/extname.ts": "593303db8ae8c865cbd9ceec6e55d4b9ac5410c1e276bfd3131916591b954441", - "https://deno.land/std@0.224.0/path/format.ts": "6ce1779b0980296cf2bc20d66436b12792102b831fd281ab9eb08fa8a3e6f6ac", - "https://deno.land/std@0.224.0/path/from_file_url.ts": "911833ae4fd10a1c84f6271f36151ab785955849117dc48c6e43b929504ee069", - "https://deno.land/std@0.224.0/path/glob_to_regexp.ts": "7f30f0a21439cadfdae1be1bf370880b415e676097fda584a63ce319053b5972", - "https://deno.land/std@0.224.0/path/is_absolute.ts": "4791afc8bfd0c87f0526eaa616b0d16e7b3ab6a65b62942e50eac68de4ef67d7", - "https://deno.land/std@0.224.0/path/is_glob.ts": "a65f6195d3058c3050ab905705891b412ff942a292bcbaa1a807a74439a14141", - "https://deno.land/std@0.224.0/path/join.ts": "ae2ec5ca44c7e84a235fd532e4a0116bfb1f2368b394db1c4fb75e3c0f26a33a", - "https://deno.land/std@0.224.0/path/join_globs.ts": "5b3bf248b93247194f94fa6947b612ab9d3abd571ca8386cf7789038545e54a0", - "https://deno.land/std@0.224.0/path/mod.ts": "f6bd79cb08be0e604201bc9de41ac9248582699d1b2ee0ab6bc9190d472cf9cd", - "https://deno.land/std@0.224.0/path/normalize.ts": "4155743ccceeed319b350c1e62e931600272fad8ad00c417b91df093867a8352", - "https://deno.land/std@0.224.0/path/normalize_glob.ts": "cc89a77a7d3b1d01053b9dcd59462b75482b11e9068ae6c754b5cf5d794b374f", - "https://deno.land/std@0.224.0/path/parse.ts": "77ad91dcb235a66c6f504df83087ce2a5471e67d79c402014f6e847389108d5a", - "https://deno.land/std@0.224.0/path/posix/_util.ts": "1e3937da30f080bfc99fe45d7ed23c47dd8585c5e473b2d771380d3a6937cf9d", - "https://deno.land/std@0.224.0/path/posix/basename.ts": "d2fa5fbbb1c5a3ab8b9326458a8d4ceac77580961b3739cd5bfd1d3541a3e5f0", - "https://deno.land/std@0.224.0/path/posix/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4", - "https://deno.land/std@0.224.0/path/posix/constants.ts": "93481efb98cdffa4c719c22a0182b994e5a6aed3047e1962f6c2c75b7592bef1", - "https://deno.land/std@0.224.0/path/posix/dirname.ts": "76cd348ffe92345711409f88d4d8561d8645353ac215c8e9c80140069bf42f00", - "https://deno.land/std@0.224.0/path/posix/extname.ts": "e398c1d9d1908d3756a7ed94199fcd169e79466dd88feffd2f47ce0abf9d61d2", - "https://deno.land/std@0.224.0/path/posix/format.ts": "185e9ee2091a42dd39e2a3b8e4925370ee8407572cee1ae52838aed96310c5c1", - "https://deno.land/std@0.224.0/path/posix/from_file_url.ts": "951aee3a2c46fd0ed488899d024c6352b59154c70552e90885ed0c2ab699bc40", - "https://deno.land/std@0.224.0/path/posix/glob_to_regexp.ts": "76f012fcdb22c04b633f536c0b9644d100861bea36e9da56a94b9c589a742e8f", - "https://deno.land/std@0.224.0/path/posix/is_absolute.ts": "cebe561ad0ae294f0ce0365a1879dcfca8abd872821519b4fcc8d8967f888ede", - "https://deno.land/std@0.224.0/path/posix/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", - "https://deno.land/std@0.224.0/path/posix/join.ts": "7fc2cb3716aa1b863e990baf30b101d768db479e70b7313b4866a088db016f63", - "https://deno.land/std@0.224.0/path/posix/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", - "https://deno.land/std@0.224.0/path/posix/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604", - "https://deno.land/std@0.224.0/path/posix/normalize.ts": "baeb49816a8299f90a0237d214cef46f00ba3e95c0d2ceb74205a6a584b58a91", - "https://deno.land/std@0.224.0/path/posix/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", - "https://deno.land/std@0.224.0/path/posix/parse.ts": "09dfad0cae530f93627202f28c1befa78ea6e751f92f478ca2cc3b56be2cbb6a", - "https://deno.land/std@0.224.0/path/posix/relative.ts": "3907d6eda41f0ff723d336125a1ad4349112cd4d48f693859980314d5b9da31c", - "https://deno.land/std@0.224.0/path/posix/resolve.ts": "08b699cfeee10cb6857ccab38fa4b2ec703b0ea33e8e69964f29d02a2d5257cf", - "https://deno.land/std@0.224.0/path/posix/to_file_url.ts": "7aa752ba66a35049e0e4a4be5a0a31ac6b645257d2e031142abb1854de250aaf", - "https://deno.land/std@0.224.0/path/posix/to_namespaced_path.ts": "28b216b3c76f892a4dca9734ff1cc0045d135532bfd9c435ae4858bfa5a2ebf0", - "https://deno.land/std@0.224.0/path/relative.ts": "ab739d727180ed8727e34ed71d976912461d98e2b76de3d3de834c1066667add", - "https://deno.land/std@0.224.0/path/resolve.ts": "a6f977bdb4272e79d8d0ed4333e3d71367cc3926acf15ac271f1d059c8494d8d", - "https://deno.land/std@0.224.0/path/to_file_url.ts": "88f049b769bce411e2d2db5bd9e6fd9a185a5fbd6b9f5ad8f52bef517c4ece1b", - "https://deno.land/std@0.224.0/path/to_namespaced_path.ts": "b706a4103b104cfadc09600a5f838c2ba94dbcdb642344557122dda444526e40", - "https://deno.land/std@0.224.0/path/windows/_util.ts": "d5f47363e5293fced22c984550d5e70e98e266cc3f31769e1710511803d04808", - "https://deno.land/std@0.224.0/path/windows/basename.ts": "6bbc57bac9df2cec43288c8c5334919418d784243a00bc10de67d392ab36d660", - "https://deno.land/std@0.224.0/path/windows/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4", - "https://deno.land/std@0.224.0/path/windows/constants.ts": "5afaac0a1f67b68b0a380a4ef391bf59feb55856aa8c60dfc01bd3b6abb813f5", - "https://deno.land/std@0.224.0/path/windows/dirname.ts": "33e421be5a5558a1346a48e74c330b8e560be7424ed7684ea03c12c21b627bc9", - "https://deno.land/std@0.224.0/path/windows/extname.ts": "165a61b00d781257fda1e9606a48c78b06815385e7d703232548dbfc95346bef", - "https://deno.land/std@0.224.0/path/windows/format.ts": "bbb5ecf379305b472b1082cd2fdc010e44a0020030414974d6029be9ad52aeb6", - "https://deno.land/std@0.224.0/path/windows/from_file_url.ts": "ced2d587b6dff18f963f269d745c4a599cf82b0c4007356bd957cb4cb52efc01", - "https://deno.land/std@0.224.0/path/windows/glob_to_regexp.ts": "e45f1f89bf3fc36f94ab7b3b9d0026729829fabc486c77f414caebef3b7304f8", - "https://deno.land/std@0.224.0/path/windows/is_absolute.ts": "4a8f6853f8598cf91a835f41abed42112cebab09478b072e4beb00ec81f8ca8a", - "https://deno.land/std@0.224.0/path/windows/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", - "https://deno.land/std@0.224.0/path/windows/join.ts": "8d03530ab89195185103b7da9dfc6327af13eabdcd44c7c63e42e27808f50ecf", - "https://deno.land/std@0.224.0/path/windows/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", - "https://deno.land/std@0.224.0/path/windows/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604", - "https://deno.land/std@0.224.0/path/windows/normalize.ts": "78126170ab917f0ca355a9af9e65ad6bfa5be14d574c5fb09bb1920f52577780", - "https://deno.land/std@0.224.0/path/windows/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", - "https://deno.land/std@0.224.0/path/windows/parse.ts": "08804327b0484d18ab4d6781742bf374976de662f8642e62a67e93346e759707", - "https://deno.land/std@0.224.0/path/windows/relative.ts": "3e1abc7977ee6cc0db2730d1f9cb38be87b0ce4806759d271a70e4997fc638d7", - "https://deno.land/std@0.224.0/path/windows/resolve.ts": "8dae1dadfed9d46ff46cc337c9525c0c7d959fb400a6308f34595c45bdca1972", - "https://deno.land/std@0.224.0/path/windows/to_file_url.ts": "40e560ee4854fe5a3d4d12976cef2f4e8914125c81b11f1108e127934ced502e", -<<<<<<< HEAD:packages/ui/api/ai/deno.lock - "https://deno.land/std@0.224.0/path/windows/to_namespaced_path.ts": "4ffa4fb6fae321448d5fe810b3ca741d84df4d7897e61ee29be961a6aac89a4c" -======= - "https://deno.land/std@0.224.0/path/windows/to_namespaced_path.ts": "4ffa4fb6fae321448d5fe810b3ca741d84df4d7897e61ee29be961a6aac89a4c", - "https://esm.sh/@upstash/redis@1.25.2": "b9400ffe20e12237188f35ee3658f02e273ecd1abd421106af12f6ea916c81b0", - "https://esm.sh/@upstash/redis@1.25.2/denonext/redis.mjs": "d8487c833ec520cc90f52b680b172282e91941b937bc9ea879b8347e407833cc", "https://esm.sh/@upstash/redis@1.35.6": "18026bc0000af7b6b158f6e2ff7ae244c9745da61b9302e176479f8b3bc145dd", - "https://esm.sh/@upstash/redis@1.35.6/denonext/chunk-TAJI6TAE.mjs": "2ea1c6793c40ca7f431a1260e2926170a9af57dac2a6ef8dc55ff95bdfe3bb25", - "https://esm.sh/@upstash/redis@1.35.6/denonext/redis.mjs": "0d5bccf5bbc8b67335530487a16587640ac40b9b176237ee18759bae489ffc33", - "https://esm.sh/crypto-js@4.2.0/denonext/enc-hex.mjs": "d9b57ee9b036cb023e8c87f0063f616405c34f166327e6bc561ce36059eabfa6", - "https://esm.sh/crypto-js@4.2.0/denonext/sha1.mjs": "7c20a11f45d6390bfd5babfb769457ad42775bca38d140dc497e548a94f7745b", - "https://esm.sh/crypto-js@4.2.0/enc-hex?target=denonext": "e7bbfb366ad3cbea21a865f646e2dd1109398362c4779291bffb03bb6332310f", - "https://esm.sh/crypto-js@4.2.0/sha1?target=denonext": "60b6e4ce5897826e9f61dcc2a0cbf11a9431ef81cad376f7f1f2810c615e4e68", - "https://esm.sh/openai@5.13.1": "0ef5984cbbec5b8576ed2f93a37a6bd2af3d44e5b4d57a2a3c9d3db0e255774a", - "https://esm.sh/openai@5.13.1/denonext/azure.mjs": "a5f84bdea43b3d1441e66403a911493655dfe2bca8633b5f23b56f6ad0447a02", - "https://esm.sh/openai@5.13.1/denonext/client.mjs": "ef7f5b489fcdfc3e85ddced228a8757f56327b77304391f9353f6b8ca7914996", - "https://esm.sh/openai@5.13.1/denonext/core/api-promise.mjs": "f2b9f873c0693759d61ac65d3471168d23b385517aa702c49185127e3f336f9d", - "https://esm.sh/openai@5.13.1/denonext/core/error.mjs": "db7552d1a49e3af9213dc478db1b47ca1213b4ad1a2384fd32d9d6dca90eea16", - "https://esm.sh/openai@5.13.1/denonext/core/pagination.mjs": "773b932f5a5facfa153fa22c70b2d1e4d454b4b8ab19f7771a822568730770cf", - "https://esm.sh/openai@5.13.1/denonext/core/resource.mjs": "a08cd4b13a929147617d5c2678cbfccead392ef21217d7ed0a2e13926f7e2d9a", - "https://esm.sh/openai@5.13.1/denonext/core/streaming.mjs": "89040d5a51c73c3f364fccbd765f142a397e82bec2bd58600e51651436df25b6", - "https://esm.sh/openai@5.13.1/denonext/core/uploads.mjs": "2d5ec7af9e56b9914b9f5c5096d0d09c0d9ba264d912a79a645d692cccbb39b7", - "https://esm.sh/openai@5.13.1/denonext/error.mjs": "cd83291ff8b6bc4e9d31b7c2b4ee45db53545612f979db1ab5fac0b7c77e7ae3", - "https://esm.sh/openai@5.13.1/denonext/internal/errors.mjs": "7efa493ca59d198b9abe1e8d9bd4001ecee8548d46c766060bf77ca78d6493d0", - "https://esm.sh/openai@5.13.1/denonext/internal/headers.mjs": "2bfe04de2b66bbd94827b1fa21e3747db6ea9181861cbbdbdb1953bc749014d2", - "https://esm.sh/openai@5.13.1/denonext/internal/parse.mjs": "033ef4f652d5bfe4aa69599fa363e3b163db898baf89ab873090c3016b8c4fdb", - "https://esm.sh/openai@5.13.1/denonext/internal/shims.mjs": "78d5c4eccf71378816ec4da183529ba8f63ee833e2808e79c9ffabab2a28c595", - "https://esm.sh/openai@5.13.1/denonext/internal/tslib.mjs": "e7182a864434772816b3d27b742d35130efcff76056dbe28b2b74101c6e09285", - "https://esm.sh/openai@5.13.1/denonext/internal/uploads.mjs": "2d85efe5f7e0597d8246759d38a79c4cc6663ba09982f700cff376410ef1c0bf", - "https://esm.sh/openai@5.13.1/denonext/internal/utils.mjs": "672514567bc3da8b1f7cd691116fec9dd60b5ea9e09b4ac6287fef6ce47afa8b", - "https://esm.sh/openai@5.13.1/denonext/internal/utils/bytes.mjs": "c30b8941a4aa532f38a0b72287f8a6318f86bdbd30c3e7c908567b3e1c8fa805", - "https://esm.sh/openai@5.13.1/denonext/internal/utils/env.mjs": "078c604a2a55246be7c739ee608b6e6cb70b4491c5382fba721b4497c67f9c8f", - "https://esm.sh/openai@5.13.1/denonext/internal/utils/log.mjs": "0965efa431861632a667bc2c4d32f41a6f38eb5b66d8269b20bbac492aee0ee9", - "https://esm.sh/openai@5.13.1/denonext/internal/utils/path.mjs": "714a975f77667499f36a155b30bb52b900f37e4aabb5a99a46a028204a5e0afe", - "https://esm.sh/openai@5.13.1/denonext/internal/utils/sleep.mjs": "2597885e3620eeef19721533d83c2f1e747bc88e5ae3dc7cd2aa1e0742c9458c", - "https://esm.sh/openai@5.13.1/denonext/internal/utils/uuid.mjs": "c40e5330d84a5c739383334cc0e26e084bef58f09572735b9f8dd0d434d0770b", - "https://esm.sh/openai@5.13.1/denonext/internal/utils/values.mjs": "305a4e3bc6b2c6bcc6c3f417004148093a2e035fa8d321b0634c3f12d86427ae", - "https://esm.sh/openai@5.13.1/denonext/lib/AbstractChatCompletionRunner.mjs": "e2ca6bf5110b8b4b28d1a1d31468cd300368bae400e72a52d0a020854297f44f", - "https://esm.sh/openai@5.13.1/denonext/lib/EventStream.mjs": "214937b2afc3bc5542b96b1a00060054ff1af3cef36593035a8bf9bc9c781c42", - "https://esm.sh/openai@5.13.1/denonext/lib/RunnableFunction.mjs": "aef7b3beccc10adb6870659c25669aa4451f03670b163b88d97ee1aa27e7625e", - "https://esm.sh/openai@5.13.1/denonext/lib/chatCompletionUtils.mjs": "a92757b94fc9b19b688a5acb71b38df7164141e3b54240b4cd79cedea26bcec5", - "https://esm.sh/openai@5.13.1/denonext/lib/parser.mjs": "3a696f5568b5634b00ce1d91afc7eadf1160612bfa51e0102d8050444ce7d83a", - "https://esm.sh/openai@5.13.1/denonext/openai.mjs": "ce1bc4e1a91d8f98cb60f5d8e8ec6420a303115d77308573f5989d99df0aeaf7", - "https://esm.sh/openai@5.13.1/denonext/resources/audio/audio.mjs": "15035939336dc5d7a67619e4ae7e0537dad039e5eb61f302c451d73a0244b0ec", - "https://esm.sh/openai@5.13.1/denonext/resources/batches.mjs": "0b76a5f8e6804cf9e49e4e7260df7ee94faf2c12735bd77280e63a46f15fe5d9", - "https://esm.sh/openai@5.13.1/denonext/resources/beta/beta.mjs": "a7a7449874d7fd543314f31106c737178532bb1ba5b78c7b8a046726b2efa062", - "https://esm.sh/openai@5.13.1/denonext/resources/chat/chat.mjs": "b1bbdfc35994fd5a3d40a7691b1a046d173b7cdccff774062c4a3916aee7e610", - "https://esm.sh/openai@5.13.1/denonext/resources/chat/completions/index.mjs": "489a67b461a0e7633edf2107dc213bc41d6814053cbec2760f15b454cb78ffc8", - "https://esm.sh/openai@5.13.1/denonext/resources/completions.mjs": "eb12a46f01c0b12bcf86a08aa114e2116d271aabdd151b776d44d8e78e360ec5", - "https://esm.sh/openai@5.13.1/denonext/resources/containers/containers.mjs": "0a30f5b2acfa5c6469c7ff4a0857aebd98d631b616440e05d0b7f0422aa97513", - "https://esm.sh/openai@5.13.1/denonext/resources/embeddings.mjs": "7e472c96e4b2f0d1b1f11577dfaed2fa375ebb13284458583fba97ca7c297fac", - "https://esm.sh/openai@5.13.1/denonext/resources/evals/evals.mjs": "6e717414ff8dafe8712bda64df50e3533ef1580121470227122d20f45ba4eb47", - "https://esm.sh/openai@5.13.1/denonext/resources/files.mjs": "0dd7368a1715a004e708aa2c5f8e220d157cc93b80928e5ad8efe6222191bd1f", - "https://esm.sh/openai@5.13.1/denonext/resources/fine-tuning/fine-tuning.mjs": "bdd625a72c3f5b6da5b91b2ca082c1f6785f8f5c1f8f1b51c1b4c22fc0347cd6", - "https://esm.sh/openai@5.13.1/denonext/resources/graders/graders.mjs": "2b88c29d8ff51a57b167f01f068c96ee87a6a35e1fb610290f0b8a0455c01c32", - "https://esm.sh/openai@5.13.1/denonext/resources/images.mjs": "e6c1f3e7f2e3723ffe01cba8e3ab0d520bffd775cfb283f721b1f3fc1c00dd32", - "https://esm.sh/openai@5.13.1/denonext/resources/index.mjs": "b3d2cf61c18fddf26a39b722fed58ef5a2bcf52957a34711072174ba9de20da6", - "https://esm.sh/openai@5.13.1/denonext/resources/models.mjs": "39a7e848a14b53bfe5930ec726dc10f2837ffe318e2d25fa2419b63ec80d3651", - "https://esm.sh/openai@5.13.1/denonext/resources/moderations.mjs": "c9c99b985109090bd7bbb623db0fd20f539a2027bf531ca762830a52dfcbcad0", - "https://esm.sh/openai@5.13.1/denonext/resources/responses/responses.mjs": "0a091a55c0dcc830a68b91d5741614c180be96687f71c2726d55b805a0764673", - "https://esm.sh/openai@5.13.1/denonext/resources/uploads/uploads.mjs": "b19b323a36618003ada0b0168b33662f43d67820baf96a6388f3ecc2ccf76a54", - "https://esm.sh/openai@5.13.1/denonext/resources/vector-stores/vector-stores.mjs": "92dfd761eb4d88bd2ae78ffd2e8d04f6d6067b1e22946f56310e52ac8bbc8518", - "https://esm.sh/openai@5.13.1/denonext/resources/webhooks.mjs": "20db2401be99bbc5225a4e7c90db2f4e7d5bb7e29700e8041f2244c200a902ed", - "https://esm.sh/openai@5.13.1/denonext/streaming.mjs": "9eb0a252d1fb6e345b1b1a802b1e98dd61f063b4f4929d9673c9d8dea1c62702", - "https://esm.sh/openai@5.13.1/denonext/version.mjs": "882faa862a3c0b55f59198719bd3b66cd7d1e0934fe4ce571ff7664b343e7f73", - "https://esm.sh/openai@5.13.1/lib/ChatCompletionStream.mjs": "5e893f12c80efe27ea3585280237c97dc5f77ff93e13a4b7ff36dc9be945970b", - "https://esm.sh/openai@5.23.2": "18c9a853acea5ea20099acc7af13d1f90de40e60d072138257f6cee73131cee2", - "https://esm.sh/openai@5.23.2/denonext/azure.mjs": "861a920db3ef442226f9afba3371625f22854970b9c2563e15c8b049101604cc", - "https://esm.sh/openai@5.23.2/denonext/client.mjs": "cd14f5748ad5702353b8b1ac6289937fed0909bdd652842d33816a6421ae1b3e", - "https://esm.sh/openai@5.23.2/denonext/core/api-promise.mjs": "3d306a063412dca41b2ec293d22de25f4998613f1560cd2d16b25b11c6bbac60", - "https://esm.sh/openai@5.23.2/denonext/core/error.mjs": "1c0fc71bbe3409121aea6b02cb94a339f35f84d586c1cce881dfc036fd76c31c", - "https://esm.sh/openai@5.23.2/denonext/core/pagination.mjs": "68f1d809ff8af4019f8aec2bb1b55261bfd1a6735d2737f2ff42c4d046bfd457", - "https://esm.sh/openai@5.23.2/denonext/core/resource.mjs": "dc9b968c6e12958b4842d3bb317e612df1407c627c62e7a5712a285c5ccc2830", - "https://esm.sh/openai@5.23.2/denonext/core/streaming.mjs": "c5d81d565282a14800274a8dba998cc7d732f8a871117a35e1acc56611700627", - "https://esm.sh/openai@5.23.2/denonext/core/uploads.mjs": "61f6c87b387bc15d267b06415d978cb761b760169586748da96b47ece60bc8b0", - "https://esm.sh/openai@5.23.2/denonext/error.mjs": "7b6e16fae0c8cdc1a2666940c9a3f5b0a3d96ffbcb5dda55cd1135b4dbc09cd7", - "https://esm.sh/openai@5.23.2/denonext/internal/errors.mjs": "339efff273a9b2653e9bbd3bf80e4787607058542639abc46d9a9b7f69d5065d", - "https://esm.sh/openai@5.23.2/denonext/internal/headers.mjs": "0dc4a75adb1bcd0ce69387ed74ec00ac0dbf654305626e019262b7d0ffcc34b5", - "https://esm.sh/openai@5.23.2/denonext/internal/parse.mjs": "4406db1122214957c9844cb4f3f3fd89d0eb214bd733878844166ff93ecfb657", - "https://esm.sh/openai@5.23.2/denonext/internal/shims.mjs": "869afba5c9cad4ddbeac636a1672e15f28b4511837c8768e78052ff1ecc2aadc", - "https://esm.sh/openai@5.23.2/denonext/internal/tslib.mjs": "b3f95f57fb360dd1e8fa1d976b70f88c0087b0e7626238bf1ac011c08aab9029", - "https://esm.sh/openai@5.23.2/denonext/internal/uploads.mjs": "cb7ca0d8ad424e9c4c7d0e8d660894de67275e09264d751a286a37b55b06a60f", - "https://esm.sh/openai@5.23.2/denonext/internal/utils.mjs": "f90b350e2d58df257c65b0d0d038793b0c7c28007bb9b2e1af3330de530726e1", - "https://esm.sh/openai@5.23.2/denonext/internal/utils/bytes.mjs": "7a173944415c7c98092f3f64d4869b06352891c86224a6288cd5b948f6099ed1", - "https://esm.sh/openai@5.23.2/denonext/internal/utils/env.mjs": "989300dc3c0155101310ef586c4ec11b1b28374390008466a82a5358a0bf3cd9", - "https://esm.sh/openai@5.23.2/denonext/internal/utils/log.mjs": "ff989515d620763b6c50d5a0911bf87dedd05499f08e9b6c60c0939bff7dd63b", - "https://esm.sh/openai@5.23.2/denonext/internal/utils/path.mjs": "aa2e93f9627bf2ff1ddba81a900c9e8c3bc0bc340d773282d264edecf0201cb5", - "https://esm.sh/openai@5.23.2/denonext/internal/utils/sleep.mjs": "8cc3607942d5456fcff0791bd76159c0bdcf4045f0df5bcc631e7aa0007f5bed", - "https://esm.sh/openai@5.23.2/denonext/internal/utils/uuid.mjs": "930d86b806f784ec4f4ca5f281dbc81275c5502e559333e4f7531fcfbdeeec6e", - "https://esm.sh/openai@5.23.2/denonext/internal/utils/values.mjs": "6ae7003a2e877ba3c5a9907c86d4ae6127e30b547c2799fed26e3511ef34b211", - "https://esm.sh/openai@5.23.2/denonext/lib/AbstractChatCompletionRunner.mjs": "23b10704473a21f4f99673e0c97214bbaa2047ef3c68010a33242e592f1a367b", - "https://esm.sh/openai@5.23.2/denonext/lib/EventStream.mjs": "9d55a5e80ce128c8cfe397ce6eca3f9769cbf5983bd6d7ea19c90a078fa3f120", - "https://esm.sh/openai@5.23.2/denonext/lib/RunnableFunction.mjs": "bcacb84aeefde5fab68ea7f3ecc005ca8c8b5ddec4c95c7b4b2765703536f6de", - "https://esm.sh/openai@5.23.2/denonext/lib/chatCompletionUtils.mjs": "a59f5c19e7eaba4288fce3da901ddf459dff267fd0f5e625c14bc41822877e41", - "https://esm.sh/openai@5.23.2/denonext/lib/parser.mjs": "fb3d5d41d3288fc5432f4c96b9e936dc235560dc459cb54aa551defdfacacf3c", - "https://esm.sh/openai@5.23.2/denonext/openai.mjs": "bd1c14bddec48f9287ebc694a1f15af9a7edda353f5ec724c24955bf39da8553", - "https://esm.sh/openai@5.23.2/denonext/resources/audio/audio.mjs": "f6c9e7c018be327e39721ce14ca2b6f0036a2d11932b868769a7259505b41e4c", - "https://esm.sh/openai@5.23.2/denonext/resources/batches.mjs": "862e98d3ee070ea44dcb7129ab3706ea659ff271e158f4220bd59db8aac0584e", - "https://esm.sh/openai@5.23.2/denonext/resources/beta/beta.mjs": "3c81b7c65fb6acffbd557dc27a50840b8816c56ae52a95492712252c8ae62fe4", - "https://esm.sh/openai@5.23.2/denonext/resources/chat/chat.mjs": "40068f56f54bfcb8d337d0540d004c1e0ffeaa4afa651061473578a60de00546", - "https://esm.sh/openai@5.23.2/denonext/resources/chat/completions/index.mjs": "84a10ad22b033369a1d1a157ce7ce06ecf32ea7e4ac1c49f3202b6dd2c471b95", - "https://esm.sh/openai@5.23.2/denonext/resources/completions.mjs": "d9885e2303e397806512c92e17fb7665855e73cc96a2bd070b1ab35d3c55b515", - "https://esm.sh/openai@5.23.2/denonext/resources/containers/containers.mjs": "8579666d685277e06bd9e4157b7955271278da054de4d932fb8ccaa4d5855d74", - "https://esm.sh/openai@5.23.2/denonext/resources/conversations/conversations.mjs": "fa055ced06c8c143dc15f9d20014b9d6f2af077f7fdf7d4dd078fc2e2bcc74bc", - "https://esm.sh/openai@5.23.2/denonext/resources/embeddings.mjs": "8155a273a2b745737644114c0bd564e88d383fa1b7f76aef17e2bc0edf9de573", - "https://esm.sh/openai@5.23.2/denonext/resources/evals/evals.mjs": "951234c3751c8fe11977a3b112e5ff81ba793bb61036c35e46a0ecc359f46472", - "https://esm.sh/openai@5.23.2/denonext/resources/files.mjs": "b8a0fc1f7750ed8ae0692149d63acc66618f7db078023170bd94c48206aff344", - "https://esm.sh/openai@5.23.2/denonext/resources/fine-tuning/fine-tuning.mjs": "338edaa2b94083ff1d238026a785b5c487748564fa67956ef3fed00703f2d9a1", - "https://esm.sh/openai@5.23.2/denonext/resources/graders/graders.mjs": "5a8979f09bafb70245317f499c5bc649981857679b5568ee5140dd459c759f5c", - "https://esm.sh/openai@5.23.2/denonext/resources/images.mjs": "0e55d6c712ea07d3ab2ecc9fce3a860ff916669c1b91969d434c242d4591eaa4", - "https://esm.sh/openai@5.23.2/denonext/resources/index.mjs": "c6f4739086a037feb6698e897ff48e4663a25366a0009d906460ae80cc59e9ae", - "https://esm.sh/openai@5.23.2/denonext/resources/models.mjs": "2b406d2ddb2e682fdd6444d072311faf6ebd2e0afe3d1e614b3c56f8efd2877b", - "https://esm.sh/openai@5.23.2/denonext/resources/moderations.mjs": "3fae384a7cefdd5020b20a550553aa0b5fd847455649e81d27a0c19228cd9de7", - "https://esm.sh/openai@5.23.2/denonext/resources/realtime/realtime.mjs": "f433992a4a5c3b6350828191c5a4c0eb790684aea873531f254c4e7ef4d1526f", - "https://esm.sh/openai@5.23.2/denonext/resources/responses/responses.mjs": "9c1d4db5078327eda92434e82227f0e5bf21f8689b20d66b3162129ed416d29c", - "https://esm.sh/openai@5.23.2/denonext/resources/uploads/uploads.mjs": "8d8c996cff88595454cbbaab6f8f2220d19258e17af4d249513c6972b8a70fee", - "https://esm.sh/openai@5.23.2/denonext/resources/vector-stores/vector-stores.mjs": "0d6d13b6def2e77c4b4d16f0d81e0dc55876f77994d48fd4538a66276ced0fee", - "https://esm.sh/openai@5.23.2/denonext/resources/webhooks.mjs": "f08af37a3ede2e096b447182bc53c970ae72845b70fb66f56a4393de031c0639", - "https://esm.sh/openai@5.23.2/denonext/streaming.mjs": "222c46a59c680af6cd7952bab85e2e9b3de6c85aa7323162b2dcb41e17a6401c", - "https://esm.sh/openai@5.23.2/denonext/version.mjs": "0fcc73b57c217be9679bede707faa89db6055de8d1b0bbfcf69d56ea3cce4f1d", - "https://esm.sh/uncrypto@0.1.3/denonext/uncrypto.mjs": "610754e3fadd2110d6623dc68ce172f530491167504ce8b1b886c9e071cfe14f", - "https://esm.sh/uncrypto@0.1.3?target=denonext": "bc6d905780a009deb8e198516e0b404a22cb7ca992fbd372fef508e0ad534e02" - }, - "workspace": { - "packageJson": { - "dependencies": [ - "npm:@rollup/plugin-alias@^5.1.1", - "npm:@rollup/plugin-commonjs@^28.0.8", - "npm:@rollup/plugin-json@^6.1.0", - "npm:@rollup/plugin-node-resolve@^16.0.3", - "npm:@rollup/plugin-replace@^6.0.2", - "npm:@rollup/plugin-typescript@^12.1.4", - "npm:@types/file-saver@^2.0.7", - "npm:@types/node@^20.19.21", - "npm:@types/resize-observer-browser@^0.1.11", - "npm:@types/semver@^7.7.1", - "npm:@upstash/redis@1.35.6", - "npm:autoprefixer@^10.4.21", - "npm:ava@^6.4.1", - "npm:file-saver@^2.0.5", - "npm:highlight.js@^11.11.1", - "npm:highlightjs-cairo@^0.4.0", - "npm:highlightjs-solidity@^2.0.6", - "npm:openai@5.23.2", - "npm:path-browserify@^1.0.1", - "npm:postcss-load-config@^6.0.1", - "npm:postcss@^8.5.6", - "npm:rollup-plugin-livereload@^2.0.5", - "npm:rollup-plugin-styles@^4.0.0", - "npm:rollup-plugin-svelte@^7.2.3", - "npm:rollup-plugin-terser@^7.0.2", - "npm:rollup@^4.52.4", - "npm:semver@^7.7.3", - "npm:sirv-cli@^3.0.1", - "npm:svelte-check@^3.8.6", - "npm:svelte-preprocess@^5.1.4", - "npm:svelte@^3.55.0", - "npm:tailwindcss@^3.4.18", - "npm:tippy.js@^6.3.7", - "npm:ts-node@^10.9.2", - "npm:tslib@^2.8.1", - "npm:typescript@^5.9.3", - "npm:util@^0.12.5" - ] - } ->>>>>>> upstream/master:packages/ui/deno.lock + "https://esm.sh/openai@5.23.2": "18c9a853acea5ea20099acc7af13d1f90de40e60d072138257f6cee73131cee2" } } diff --git a/packages/ui/api/stellar/Cargo.lock b/packages/ui/api/stellar/Cargo.lock index 63310e4e9..ff9b8bbb6 100644 --- a/packages/ui/api/stellar/Cargo.lock +++ b/packages/ui/api/stellar/Cargo.lock @@ -8,7 +8,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" dependencies = [ - "bitflags", + "bitflags 2.9.1", "bytes", "futures-core", "futures-sink", @@ -57,7 +57,7 @@ dependencies = [ "actix-service", "actix-utils", "base64", - "bitflags", + "bitflags 2.9.1", "brotli", "bytes", "bytestring", @@ -92,7 +92,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn", + "syn 2.0.104", ] [[package]] @@ -116,6 +116,7 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24eda4e2a6e042aa4e55ac438a2ae052d3b5da0ecf83d7411e1a368946925208" dependencies = [ + "actix-macros", "futures-core", "tokio", ] @@ -209,7 +210,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn", + "syn 2.0.104", ] [[package]] @@ -348,6 +349,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + [[package]] name = "bitflags" version = "2.9.1" @@ -534,7 +541,7 @@ dependencies = [ "hashbrown 0.14.5", "lock_api", "once_cell", - "parking_lot_core", + "parking_lot_core 0.9.11", ] [[package]] @@ -560,7 +567,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.104", ] [[package]] @@ -580,7 +587,7 @@ checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.104", "unicode-xid", ] @@ -603,7 +610,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.104", ] [[package]] @@ -754,7 +761,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.104", ] [[package]] @@ -850,7 +857,7 @@ dependencies = [ "getrandom", "no-std-compat", "nonzero_ext", - "parking_lot", + "parking_lot 0.12.4", "portable-atomic", "quanta", "rand", @@ -1054,13 +1061,22 @@ dependencies = [ "generic-array", ] +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + [[package]] name = "io-uring" version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" dependencies = [ - "bitflags", + "bitflags 2.9.1", "cfg-if", "libc", ] @@ -1098,7 +1114,7 @@ checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.104", ] [[package]] @@ -1127,6 +1143,12 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + [[package]] name = "libbz2-rs-sys" version = "0.2.2" @@ -1275,6 +1297,17 @@ version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + [[package]] name = "parking_lot" version = "0.12.4" @@ -1282,7 +1315,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" dependencies = [ "lock_api", - "parking_lot_core", + "parking_lot_core 0.9.11", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", ] [[package]] @@ -1293,7 +1340,7 @@ checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.17", "smallvec", "windows-targets 0.52.6", ] @@ -1451,7 +1498,16 @@ version = "11.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6df7ab838ed27997ba19a4664507e6f82b41fe6e20be42929332156e5e85146" dependencies = [ - "bitflags", + "bitflags 2.9.1", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", ] [[package]] @@ -1460,7 +1516,7 @@ version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ - "bitflags", + "bitflags 2.9.1", ] [[package]] @@ -1510,7 +1566,7 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ - "bitflags", + "bitflags 2.9.1", "errno", "libc", "linux-raw-sys", @@ -1555,7 +1611,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.104", ] [[package]] @@ -1582,6 +1638,28 @@ dependencies = [ "serde", ] +[[package]] +name = "serial_test" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0bccbcf40c8938196944a3da0e133e031a33f4d6b72db3bda3cc556e361905d" +dependencies = [ + "lazy_static", + "parking_lot 0.11.2", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2acd6defeddb41eb60bb468f8825d0cfd0c2a76bc03bfd235b6a1dc4f6a1ad5" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "sha1" version = "0.10.6" @@ -1678,12 +1756,14 @@ version = "0.1.0" dependencies = [ "actix-cors", "actix-governor", + "actix-rt", "actix-web", "dotenvy", "env_logger", "globset", "libc", "log", + "serial_test", "tempfile", "walkdir", "zip", @@ -1695,6 +1775,17 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "syn" version = "2.0.104" @@ -1714,7 +1805,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.104", ] [[package]] @@ -1782,7 +1873,7 @@ dependencies = [ "io-uring", "libc", "mio", - "parking_lot", + "parking_lot 0.12.4", "pin-project-lite", "signal-hook-registry", "slab", @@ -1823,7 +1914,7 @@ checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.104", ] [[package]] @@ -1928,7 +2019,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn", + "syn 2.0.104", "wasm-bindgen-shared", ] @@ -1950,7 +2041,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.104", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2183,7 +2274,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags", + "bitflags 2.9.1", ] [[package]] @@ -2212,7 +2303,7 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.104", "synstructure", ] @@ -2233,7 +2324,7 @@ checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.104", ] [[package]] @@ -2253,7 +2344,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.104", "synstructure", ] @@ -2274,7 +2365,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.104", ] [[package]] @@ -2307,7 +2398,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.104", ] [[package]] diff --git a/packages/ui/api/stellar/Cargo.toml b/packages/ui/api/stellar/Cargo.toml index 32679a418..74187bb6c 100644 --- a/packages/ui/api/stellar/Cargo.toml +++ b/packages/ui/api/stellar/Cargo.toml @@ -17,6 +17,10 @@ tempfile = "^3.21.0" globset = "^0.4.16" libc = "^0.2.175" +[dev-dependencies] +actix-rt = "2" +serial_test = "0.5" + [package.metadata.tools] stellar_cli = "23.0.1" stellar_scaffold_cli = "0.0.8" diff --git a/packages/ui/api/stellar/src/controllers/upgrade_scaffold.rs b/packages/ui/api/stellar/src/controllers/upgrade_scaffold.rs index 8e3fe1843..261e4e224 100644 --- a/packages/ui/api/stellar/src/controllers/upgrade_scaffold.rs +++ b/packages/ui/api/stellar/src/controllers/upgrade_scaffold.rs @@ -1,17 +1,6 @@ use crate::environment::{run_scaffold_upgrade_command, unzip_in_temporary_folder, zip_directory}; use crate::utils::to_http_hidden_error; use actix_web::{web, Error as HttpError}; -use std::path::{Path, PathBuf}; -use walkdir::WalkDir; - -fn list_files(dir: &Path) -> Vec { - WalkDir::new(dir) - .into_iter() - .filter_map(|e| e.ok()) - .filter(|e| e.file_type().is_file()) - .map(|e| e.into_path()) - .collect() -} pub async fn upgrade_to_scaffold(rust_contract_zip: web::Bytes) -> Result, HttpError> { let contract_zipped_files = [ diff --git a/packages/ui/api/stellar/tests/config/mod.rs b/packages/ui/api/stellar/tests/config/mod.rs new file mode 100644 index 000000000..74f47ad34 --- /dev/null +++ b/packages/ui/api/stellar/tests/config/mod.rs @@ -0,0 +1 @@ +pub mod server; diff --git a/packages/ui/api/stellar/tests/config/server.rs b/packages/ui/api/stellar/tests/config/server.rs new file mode 100644 index 000000000..a796a33ce --- /dev/null +++ b/packages/ui/api/stellar/tests/config/server.rs @@ -0,0 +1,55 @@ +use std::env; +use stellar_api::config::ServerConfig; + +#[test] +fn ai_server_config_defaults_and_overrides() { + // Clear environment vars we might affect + let old_host = env::var_os("HOST"); + let old_port = env::var_os("APP_PORT"); + let old_rate = env::var_os("RATE_LIMIT_REQUESTS_PER_SECOND"); + let old_origin = env::var_os("WIZARD_ORIGIN"); + + env::remove_var("HOST"); + env::remove_var("APP_PORT"); + env::remove_var("RATE_LIMIT_REQUESTS_PER_SECOND"); + env::remove_var("WIZARD_ORIGIN"); + + let cfg = ServerConfig::from_environment_variables(); + assert_eq!(cfg.host, "0.0.0.0"); + // default port is parsed or fallback to 8888 in this crate + assert!(cfg.port > 0); + + // Now set custom values + env::set_var("HOST", "127.0.0.1"); + env::set_var("APP_PORT", "4242"); + env::set_var("RATE_LIMIT_REQUESTS_PER_SECOND", "7"); + env::set_var("WIZARD_ORIGIN", "https://example.test"); + + let cfg2 = ServerConfig::from_environment_variables(); + assert_eq!(cfg2.host, "127.0.0.1"); + assert_eq!(cfg2.port, 4242); + assert_eq!(cfg2.rate_limit_requests_per_second, 7); + assert_eq!(cfg2.wizard_origin, "https://example.test"); + + // restore + if let Some(v) = old_host { + env::set_var("HOST", v); + } else { + env::remove_var("HOST"); + } + if let Some(v) = old_port { + env::set_var("APP_PORT", v); + } else { + env::remove_var("APP_PORT"); + } + if let Some(v) = old_rate { + env::set_var("RATE_LIMIT_REQUESTS_PER_SECOND", v); + } else { + env::remove_var("RATE_LIMIT_REQUESTS_PER_SECOND"); + } + if let Some(v) = old_origin { + env::set_var("WIZARD_ORIGIN", v); + } else { + env::remove_var("WIZARD_ORIGIN"); + } +} diff --git a/packages/ui/api/stellar/tests/controllers/mod.rs b/packages/ui/api/stellar/tests/controllers/mod.rs new file mode 100644 index 000000000..115cd580c --- /dev/null +++ b/packages/ui/api/stellar/tests/controllers/mod.rs @@ -0,0 +1 @@ +pub mod upgrade_scaffold; diff --git a/packages/ui/api/stellar/tests/controllers/upgrade_scaffold.rs b/packages/ui/api/stellar/tests/controllers/upgrade_scaffold.rs new file mode 100644 index 000000000..89243bb0a --- /dev/null +++ b/packages/ui/api/stellar/tests/controllers/upgrade_scaffold.rs @@ -0,0 +1,202 @@ +use actix_web::web; +use stellar_api::controllers::upgrade_to_scaffold; +use stellar_api::environment::{ + expected_entry_count, run_scaffold_upgrade_command, unzip_in_temporary_folder, +}; +use zip::ZipArchive; + +#[actix_rt::test] +async fn ai_upgrade_to_scaffold_invalid_zip_returns_err() { + // invalid bytes should cause upgrade_to_scaffold to return an Err + let bad = web::Bytes::from_static(&[0u8, 1, 2, 3]); + let res = upgrade_to_scaffold(bad).await; + assert!(res.is_err(), "expected error for invalid zip"); +} + +use serial_test::serial; +use std::env; +use std::fs::write; +use std::io::Cursor; +use std::io::Write as IoWrite; +use tempfile::tempdir; +use zip::write::FileOptions; +use zip::CompressionMethod; +use zip::ZipWriter; + +fn make_fake_stellar(dir: &std::path::Path, exit_code: i32) -> std::path::PathBuf { + let path = dir.join("stellar"); + let mut f = std::fs::File::create(&path).expect("create exe"); + write!(f, "#!/bin/sh\n").unwrap(); + write!(f, "exit {}\n", exit_code).unwrap(); + let mut perms = f.metadata().unwrap().permissions(); + #[cfg(unix)] + { + use std::os::unix::fs::PermissionsExt; + perms.set_mode(0o755); + std::fs::set_permissions(&path, perms).unwrap(); + } + path +} + +#[actix_rt::test] +#[serial] +async fn ai_upgrade_to_scaffold_success_returns_ok() { + let tmp = tempdir().expect("tmp"); + let root = tmp.path(); + std::fs::create_dir_all(root.join("contracts/proj/src")).unwrap(); + write(root.join("contracts/proj/src/contract.rs"), b"c").unwrap(); + write(root.join("contracts/proj/Cargo.toml"), b"[package]").unwrap(); + write(root.join("Cargo.toml"), b"[workspace]").unwrap(); + let mut bytes = Vec::new(); + { + let cursor = Cursor::new(&mut bytes); + let mut writer = ZipWriter::new(cursor); + let options = FileOptions::<()>::default().compression_method(CompressionMethod::Deflated); + writer.add_directory("contracts/", options).unwrap(); + writer.add_directory("contracts/proj/", options).unwrap(); + writer + .add_directory("contracts/proj/src/", options) + .unwrap(); + writer + .start_file("contracts/proj/src/contract.rs", options) + .unwrap(); + writer.write_all(b"c").unwrap(); + writer + .start_file("contracts/proj/src/test.rs", options) + .unwrap(); + writer.write_all(b"t").unwrap(); + writer + .start_file("contracts/proj/src/lib.rs", options) + .unwrap(); + writer.write_all(b"l").unwrap(); + writer + .start_file("contracts/proj/Cargo.toml", options) + .unwrap(); + writer.write_all(b"[package]").unwrap(); + writer.start_file("README.md", options).unwrap(); + writer.write_all(b"readme").unwrap(); + writer.start_file("Cargo.toml", options).unwrap(); + writer.write_all(b"[workspace]").unwrap(); + writer.finish().unwrap(); + } + + // debug: inspect zip archive entries vs expected count + let contract_zipped_files = [ + "contracts/*/src/contract.rs", + "contracts/*/src/test.rs", + "contracts/*/src/lib.rs", + "contracts/*/Cargo.toml", + "Cargo.toml", + "README.md", + ]; + let cursor = Cursor::new(bytes.clone()); + if let Ok(archive) = ZipArchive::new(cursor) { + eprintln!("archive.len() = {}", archive.len()); + } else { + eprintln!("failed to open archive for debugging"); + } + eprintln!( + "expected_entry_count = {}", + expected_entry_count(&contract_zipped_files) + ); + + let bin = tmp.path().join("bin"); + std::fs::create_dir_all(&bin).unwrap(); + let _exe = make_fake_stellar(&bin, 0); + let old = env::var_os("PATH"); + let newp = format!("{}:{}", bin.display(), env::var("PATH").unwrap_or_default()); + env::set_var("PATH", &newp); + + eprintln!("TEST PATH={}", env::var("PATH").unwrap_or_default()); + eprintln!("stellar present: {}", bin.join("stellar").exists()); + + let good = web::Bytes::from(bytes); + + // For debugging: unzip and run the scaffold command directly to see stderr + match unzip_in_temporary_folder(good.to_vec(), &contract_zipped_files) { + Ok(dir) => { + eprintln!("extracted to: {}", dir.path().display()); + let rc = run_scaffold_upgrade_command(dir.path()); + eprintln!("run_scaffold_upgrade_command returned: {:?}", rc); + let _ = dir.close(); + } + Err(e) => { + eprintln!("unzip error: {:?}", e); + } + } + + let res = upgrade_to_scaffold(good).await; + + if let Some(v) = old { + env::set_var("PATH", v); + } + + if let Err(e) = &res { + eprintln!("upgrade_to_scaffold error: {:?}", e); + } + + assert!(res.is_ok(), "expected Ok for valid upgrade flow"); + let zipped = res.unwrap(); + assert!(!zipped.is_empty(), "expected zipped bytes returned"); +} + +#[actix_rt::test] +#[serial] +async fn ai_upgrade_to_scaffold_internal_error_returns_err() { + // prepare a valid zip but make stellar fail to force internal error + let tmp = tempdir().expect("tmp"); + let root = tmp.path(); + std::fs::create_dir_all(root.join("contracts/proj/src")).unwrap(); + write(root.join("contracts/proj/src/contract.rs"), b"c").unwrap(); + write(root.join("contracts/proj/Cargo.toml"), b"[package]").unwrap(); + write(root.join("Cargo.toml"), b"[workspace]").unwrap(); + + let mut bytes = Vec::new(); + { + let cursor = Cursor::new(&mut bytes); + let mut writer = ZipWriter::new(cursor); + let options = FileOptions::<()>::default().compression_method(CompressionMethod::Deflated); + writer.add_directory("contracts/", options).unwrap(); + writer.add_directory("contracts/proj/", options).unwrap(); + writer + .add_directory("contracts/proj/src/", options) + .unwrap(); + writer + .start_file("contracts/proj/src/contract.rs", options) + .unwrap(); + writer.write_all(b"c").unwrap(); + writer + .start_file("contracts/proj/src/test.rs", options) + .unwrap(); + writer.write_all(b"t").unwrap(); + writer + .start_file("contracts/proj/src/lib.rs", options) + .unwrap(); + writer.write_all(b"l").unwrap(); + writer + .start_file("contracts/proj/Cargo.toml", options) + .unwrap(); + writer.write_all(b"[package]").unwrap(); + writer.start_file("README.md", options).unwrap(); + writer.write_all(b"readme").unwrap(); + writer.start_file("Cargo.toml", options).unwrap(); + writer.write_all(b"[workspace]").unwrap(); + writer.finish().unwrap(); + } + + let bin = tmp.path().join("bin"); + std::fs::create_dir_all(&bin).unwrap(); + let _exe = make_fake_stellar(&bin, 2); + let old = env::var_os("PATH"); + let newp = format!("{}:{}", bin.display(), env::var("PATH").unwrap_or_default()); + env::set_var("PATH", &newp); + + let good = web::Bytes::from(bytes); + let res = upgrade_to_scaffold(good).await; + + if let Some(v) = old { + env::set_var("PATH", v); + } + + assert!(res.is_err(), "expected Err when scaffold command fails"); +} diff --git a/packages/ui/api/stellar/tests/environment/mod.rs b/packages/ui/api/stellar/tests/environment/mod.rs index 024a9d5b3..ba03424c2 100644 --- a/packages/ui/api/stellar/tests/environment/mod.rs +++ b/packages/ui/api/stellar/tests/environment/mod.rs @@ -1 +1,2 @@ +pub mod scaffold_upgrade; pub mod zip_folder; diff --git a/packages/ui/api/stellar/tests/environment/scaffold_upgrade.rs b/packages/ui/api/stellar/tests/environment/scaffold_upgrade.rs new file mode 100644 index 000000000..6396b4179 --- /dev/null +++ b/packages/ui/api/stellar/tests/environment/scaffold_upgrade.rs @@ -0,0 +1,181 @@ +use std::fs::{create_dir_all, write, File}; +use std::io::Write; +use std::os::unix::fs::PermissionsExt; +use std::path::Path; +use tempfile::tempdir; + +use actix_web::web; +use std::env; +use std::io::Cursor; + +use serial_test::serial; +use std::sync::Mutex; +use stellar_api::controllers::upgrade_to_scaffold; +use stellar_api::environment::run_scaffold_upgrade_command; +use stellar_api::environment::{expected_entry_count, zip_directory}; + +static PATH_LOCK: Mutex<()> = Mutex::new(()); + +fn make_fake_stellar(dir: &Path, exit_code: i32, stderr: Option<&str>) -> std::path::PathBuf { + let path = dir.join("stellar"); + let mut f = File::create(&path).expect("create exe"); + writeln!(f, "#!/bin/sh").unwrap(); + if let Some(s) = stderr { + writeln!(f, "echo '{}' 1>&2", s).unwrap(); + } + writeln!(f, "exit {}", exit_code).unwrap(); + let mut perms = f.metadata().unwrap().permissions(); + perms.set_mode(0o755); + std::fs::set_permissions(&path, perms).unwrap(); + path +} + +#[actix_rt::test] +#[serial] +async fn ai_upgrade_to_scaffold_happy_path() { + let tmp = tempdir().expect("tmp"); + let root = tmp.path(); + + // build expected structure + create_dir_all(root.join("contracts/proj/src")).unwrap(); + write(root.join("contracts/proj/src/contract.rs"), b"c").unwrap(); + write(root.join("contracts/proj/src/test.rs"), b"t").unwrap(); + write(root.join("contracts/proj/src/lib.rs"), b"l").unwrap(); + write(root.join("contracts/proj/Cargo.toml"), b"[package]").unwrap(); + write(root.join("Cargo.toml"), b"[workspace]").unwrap(); + write(root.join("README.md"), b"readme").unwrap(); + + let zip_bytes = zip_directory(root).expect("zip"); + + // ensure expected_entry_count matches + let patterns = [ + "contracts/*/src/contract.rs", + "contracts/*/src/test.rs", + "contracts/*/src/lib.rs", + "contracts/*/Cargo.toml", + "Cargo.toml", + "README.md", + ]; + let _ = expected_entry_count(&patterns); + + // prepare fake stellar in PATH + let bin = tmp.path().join("bin"); + std::fs::create_dir_all(&bin).unwrap(); + let _exe = make_fake_stellar(&bin, 0, None); + let old = env::var_os("PATH"); + let newp = format!("{}:{}", bin.display(), env::var("PATH").unwrap_or_default()); + env::set_var("PATH", &newp); + + let res = upgrade_to_scaffold(zip_bytes.into()).await; + + if let Some(v) = old { + env::set_var("PATH", v); + } + + assert!(res.is_ok()); + let out = res.unwrap(); + // output should be a zip + let cursor = Cursor::new(out); + let archive = zip::ZipArchive::new(cursor).expect("open zip"); + assert!(archive.len() > 0); +} + +#[test] +#[serial] +fn run_scaffold_upgrade_command_success() { + let tmp = tempdir().expect("tmp"); + let bin_dir = tmp.path().join("bin"); + create_dir_all(&bin_dir).expect("mkdir bin"); + let stellar_path = make_fake_stellar(&bin_dir, 0, None); + + // Prepend our bin_dir to PATH for the duration of the test + let _guard = PATH_LOCK.lock().unwrap(); + let old_path = env::var_os("PATH"); + let new_path = format!( + "{}:{}", + bin_dir.display(), + env::var("PATH").unwrap_or_default() + ); + env::set_var("PATH", &new_path); + + // create a dummy project dir + let proj = tempdir().expect("proj"); + let res = run_scaffold_upgrade_command(proj.path()); + + // restore PATH + if let Some(v) = old_path { + env::set_var("PATH", v); + } + drop(_guard); + + assert!( + res.is_ok(), + "expected command to succeed, stellar at {}", + stellar_path.display() + ); +} + +#[test] +#[serial] +fn run_scaffold_upgrade_command_failure_propagates_error() { + let tmp = tempdir().expect("tmp"); + let bin_dir = tmp.path().join("bin"); + create_dir_all(&bin_dir).expect("mkdir bin"); + let _stellar_path = make_fake_stellar(&bin_dir, 2, Some("failure")); + + // Prepend our bin_dir to PATH for the duration of the test + let _guard = PATH_LOCK.lock().unwrap(); + let old_path = env::var_os("PATH"); + let new_path = format!( + "{}:{}", + bin_dir.display(), + env::var("PATH").unwrap_or_default() + ); + env::set_var("PATH", &new_path); + + let proj = tempdir().expect("proj"); + let res = run_scaffold_upgrade_command(proj.path()); + + // restore PATH + if let Some(v) = old_path { + env::set_var("PATH", v); + } + drop(_guard); + + assert!(res.is_err(), "expected command to fail and return Err"); +} + +#[test] +#[serial] +fn ai_run_scaffold_upgrade_command_when_missing_fails() { + // Ensure PATH does not include any stellar binary by setting to empty temp dir + let tmp = tempdir().expect("tmp"); + let bin = tmp.path().join("bin"); + std::fs::create_dir_all(&bin).unwrap(); + + let old = env::var_os("PATH"); + env::set_var("PATH", bin); + + let proj = tempdir().expect("proj"); + let res = run_scaffold_upgrade_command(proj.path()); + + if let Some(v) = old { + env::set_var("PATH", v); + } + + // If `stellar` exists on the machine PATH this test can't guarantee a failure + // (CI runners or dev machines may have it installed). Treat an Ok as a skip. + if res.is_ok() { + eprintln!("skipping test: 'stellar' exists on PATH"); + return; + } + + assert!(res.is_err(), "expected missing stellar to return Err"); +} + +#[actix_rt::test] +async fn ai_upgrade_to_scaffold_invalid_zip_returns_err() { + let bad = web::Bytes::from_static(&[0u8, 1, 2, 3]); + let res = upgrade_to_scaffold(bad).await; + assert!(res.is_err(), "expected error for invalid zip"); +} diff --git a/packages/ui/api/stellar/tests/environment/zip_folder.rs b/packages/ui/api/stellar/tests/environment/zip_folder.rs index d117b0c9a..0caeeab54 100644 --- a/packages/ui/api/stellar/tests/environment/zip_folder.rs +++ b/packages/ui/api/stellar/tests/environment/zip_folder.rs @@ -6,7 +6,9 @@ use tempfile::tempdir; use zip::result::ZipError; use zip::{write::FileOptions, CompressionMethod, ZipArchive, ZipWriter}; -use stellar_api::environment::{expected_entry_count, unzip_in_temporary_folder, zip_directory}; +use stellar_api::environment::{ + expected_entry_count, unzip_in_temporary_folder, zip_directory, ZipEntryLimits, +}; fn create_sample_directory() -> (tempfile::TempDir, PathBuf) { let dir = tempdir().expect("Failed to create temp dir"); @@ -21,7 +23,7 @@ fn create_sample_directory() -> (tempfile::TempDir, PathBuf) { } #[test] -fn test_returns_streaming_ndjson_response_with_headers() { +fn ai_test_returns_streaming_ndjson_response_with_headers() { let (_dir, root) = create_sample_directory(); let zip_bytes = zip_directory(&root).expect("Failed to zip directory"); @@ -39,7 +41,7 @@ fn test_returns_streaming_ndjson_response_with_headers() { } #[test] -fn test_builds_system_prompt_with_contract_context() { +fn ai_test_builds_system_prompt_with_contract_context() { // For files ["a.txt", "dir1/b.txt"], the expected entries are: // - a.txt // - dir1 @@ -50,7 +52,7 @@ fn test_builds_system_prompt_with_contract_context() { } #[test] -fn test_persists_chat_on_successful_stream_completion() { +fn ai_test_persists_chat_on_successful_stream_completion() { let dir = tempdir().expect("Failed to create temp dir"); let root = dir.path(); @@ -68,7 +70,7 @@ fn test_persists_chat_on_successful_stream_completion() { } #[test] -fn test_filters_out_messages_at_or_above500_chars() { +fn ai_test_filters_out_messages_at_or_above500_chars() { let dir = tempdir().expect("Failed to create temp dir"); let root = dir.path(); @@ -88,7 +90,7 @@ fn test_filters_out_messages_at_or_above500_chars() { } #[test] -fn test_uses_empty_tools_for_unsupported_language() { +fn ai_test_uses_empty_tools_for_unsupported_language() { let (_dir, root) = create_sample_directory(); let zip_bytes = zip_directory(&root).expect("Failed to zip directory"); @@ -104,7 +106,7 @@ fn test_uses_empty_tools_for_unsupported_language() { } #[test] -fn test_returns_error_json_on_request_parsing_failure() { +fn ai_test_returns_error_json_on_request_parsing_failure() { // Invalid zip data should fail to parse/extract let invalid = vec![0u8, 1, 2, 3, 4, 5]; let res = unzip_in_temporary_folder(invalid, &[]); @@ -112,7 +114,7 @@ fn test_returns_error_json_on_request_parsing_failure() { } #[test] -fn test_fails_when_entry_count_mismatch() { +fn ai_test_fails_when_entry_count_mismatch() { let (_dir, root) = create_sample_directory(); let zip_bytes = zip_directory(&root).expect("Failed to zip directory"); @@ -126,7 +128,7 @@ fn test_fails_when_entry_count_mismatch() { } #[test] -fn test_supports_stored_compression_method() { +fn ai_test_supports_stored_compression_method() { // Build a ZIP with Stored (no compression) for entries: a.txt and dir1/b.txt plus dir1/ directory let mut bytes = Vec::new(); { @@ -159,7 +161,7 @@ fn test_supports_stored_compression_method() { } #[test] -fn test_rejects_path_traversal_entries() { +fn ai_test_rejects_path_traversal_entries() { // Build a ZIP that contains a path traversal entry ../evil.txt let mut bytes = Vec::new(); { @@ -185,7 +187,7 @@ fn test_rejects_path_traversal_entries() { } #[test] -fn test_rejects_archives_exceeding_total_uncompressed_size() { +fn ai_test_rejects_archives_exceeding_total_uncompressed_size() { // Build a ZIP with three 40KB files using Stored compression to avoid ratio checks let mut bytes = Vec::new(); { @@ -209,7 +211,7 @@ fn test_rejects_archives_exceeding_total_uncompressed_size() { } #[test] -fn test_allows_matching_with_glob_patterns() { +fn ai_test_allows_matching_with_glob_patterns() { let (_dir, root) = create_sample_directory(); let zip_bytes = zip_directory(&root).expect("Failed to zip directory"); @@ -227,7 +229,7 @@ fn test_allows_matching_with_glob_patterns() { } #[test] -fn test_normalizes_backslashes_in_entry_names() { +fn ai_test_normalizes_backslashes_in_entry_names() { let dir = tempdir().expect("Failed to create temp dir"); let root = dir.path(); @@ -252,7 +254,7 @@ fn test_normalizes_backslashes_in_entry_names() { } #[test] -fn test_zip_directory_uses_deflated_compression_for_files() { +fn ai_test_zip_directory_uses_deflated_compression_for_files() { let (_dir, root) = create_sample_directory(); let zip_bytes = zip_directory(&root).expect("Failed to zip directory"); @@ -273,7 +275,7 @@ fn test_zip_directory_uses_deflated_compression_for_files() { } #[test] -fn test_rejects_absolute_path_entries() { +fn ai_test_rejects_absolute_path_entries() { // Build a zip that contains an absolute path entry /abs.txt let mut bytes = Vec::new(); { @@ -299,7 +301,7 @@ fn test_rejects_absolute_path_entries() { } #[test] -fn test_extracts_nested_file_and_preserves_directory_structure() { +fn ai_test_extracts_nested_file_and_preserves_directory_structure() { // Build a zip that includes the directory entry and a nested file let mut bytes = Vec::new(); { @@ -331,3 +333,171 @@ fn test_extracts_nested_file_and_preserves_directory_structure() { "parent directory should exist after extraction" ); } + +#[test] +fn ai_zip_empty_directory_roundtrip() { + let tmp = tempdir().expect("tmp"); + let root = tmp.path(); + + // nothing inside root + let zip_bytes = zip_directory(root).expect("zip empty dir"); + + // unzip with empty expected files should succeed + let extracted = unzip_in_temporary_folder(zip_bytes, &[]).expect("unzip empty"); + assert!(extracted.path().exists()); +} + +#[test] +fn ai_unzip_rejects_absolute_path() { + let mut bytes = Vec::new(); + { + let cursor = Cursor::new(&mut bytes); + let mut writer = ZipWriter::new(cursor); + let options = FileOptions::<()>::default().compression_method(CompressionMethod::Stored); + + // entry name starting with a leading slash should be treated as absolute + writer.start_file("/abs.txt", options).expect("start"); + writer.write_all(b"data").expect("write"); + writer.finish().expect("finish"); + } + + let res = unzip_in_temporary_folder(bytes, &["/abs.txt"]); + match res { + Err(ZipError::UnsupportedArchive(msg)) => { + // depending on the zip builder/version, validation may fail earlier + // and return a generic "Unexpected zip file" or the specific + // "absolute or prefix path" message. Accept either. + assert!(msg == "absolute or prefix path" || msg == "Unexpected zip file"); + } + Err(e) => panic!("expected UnsupportedArchive for absolute entry name, got {e:?}"), + Ok(_) => panic!("expected error for absolute entry name, got Ok"), + } +} + +#[test] +fn ai_unzip_rejects_symlink_entry() { + let mut bytes = Vec::new(); + { + let cursor = Cursor::new(&mut bytes); + let mut writer = ZipWriter::new(cursor); + // set unix permissions to a symlink mode + let options = FileOptions::<()>::default() + .compression_method(CompressionMethod::Stored) + .unix_permissions(0o120777); + + writer.start_file("link", options).expect("start"); + // symlink contents are typically the target path + writer.write_all(b"target").expect("write"); + writer.finish().expect("finish"); + } + + let res = unzip_in_temporary_folder(bytes, &["link"]); + match res { + Err(ZipError::UnsupportedArchive(msg)) => { + // Some zip writers do not preserve symlink metadata; accept the + // explicit symlink rejection or, in the absence of symlink metadata, + // allow successful extraction (the entry will be treated as a regular file). + assert!(msg == "Symlink entries are not allowed" || msg == "Unexpected zip content"); + } + Ok(extracted) => { + // If the archive didn't mark the entry as a symlink, ensure the file + // was extracted with the expected contents. + let content = + std::fs::read_to_string(extracted.path().join("link")).expect("read link"); + assert_eq!(content, "target"); + } + Err(e) => panic!("expected symlink entry error or successful extraction, got {e:?}"), + } +} + +#[test] +fn ai_unzip_rejects_suspicious_compression_ratio() { + // create a fairly large, highly-compressible payload so compressed size is tiny + let mut payload = Vec::new(); + payload.extend(std::iter::repeat(b'a').take(20_000)); + + let mut bytes = Vec::new(); + { + let cursor = Cursor::new(&mut bytes); + let mut writer = ZipWriter::new(cursor); + let options = FileOptions::<()>::default().compression_method(CompressionMethod::Deflated); + + writer.start_file("big.txt", options).expect("start"); + writer.write_all(&payload).expect("write"); + writer.finish().expect("finish"); + } + + // expected entry list includes the file + let res = unzip_in_temporary_folder(bytes, &["big.txt"]); + match res { + Err(ZipError::UnsupportedArchive(msg)) => assert_eq!(msg, "suspicious compression ratio"), + _ => panic!("expected suspicious compression ratio error, got {res:?}"), + } +} + +#[test] +fn ai_unzip_rejects_duplicate_entries() { + let mut bytes = Vec::new(); + { + let cursor = Cursor::new(&mut bytes); + let mut writer = ZipWriter::new(cursor); + let options = FileOptions::<()>::default().compression_method(CompressionMethod::Stored); + + writer.start_file("dup.txt", options).expect("start first"); + writer.write_all(b"one").expect("write one"); + + // add another entry with same name -- some zip writer versions reject this + match writer.start_file("dup.txt", options) { + Ok(_) => { + writer.write_all(b"two").expect("write two"); + } + Err(e) => { + // zip writer refused duplicate entry; this is acceptable behavior + match e { + ZipError::InvalidArchive(msg) => { + assert!(msg.contains("Duplicate filename")); + return; + } + _ => panic!("unexpected zip error: {e:?}"), + } + } + } + + writer.finish().expect("finish"); + } + + let res = unzip_in_temporary_folder(bytes, &["dup.txt"]); + match res { + Err(ZipError::UnsupportedArchive(msg)) => assert_eq!(msg, "duplicate entry"), + _ => panic!("expected duplicate entry error, got {res:?}"), + } +} + +#[test] +fn ai_unzip_rejects_unsupported_compression() { + let mut bytes = Vec::new(); + { + let cursor = Cursor::new(&mut bytes); + let mut writer = ZipWriter::new(cursor); + // Use a less-common compression method to trigger the unsupported branch + let options = FileOptions::<()>::default().compression_method(CompressionMethod::Bzip2); + + writer.start_file("Cargo.toml", options).expect("start"); + writer.write_all(b"[workspace]").expect("write"); + writer.finish().expect("finish"); + } + + let res = unzip_in_temporary_folder(bytes, &["Cargo.toml"]); + match res { + Err(ZipError::UnsupportedArchive(msg)) => assert_eq!(msg, "Unsupported compression method"), + _ => panic!("expected unsupported compression error, got {res:?}"), + } +} + +#[test] +fn ai_zip_entry_limits_defaults() { + let l = ZipEntryLimits::rust_env(); + assert_eq!(l.max_total_uncompressed, 100 * 1024); + assert_eq!(l.max_file_uncompressed, 50 * 1024); + assert_eq!(l.max_compression_ratio, 200); +} diff --git a/packages/ui/api/stellar/tests/routes/mod.rs b/packages/ui/api/stellar/tests/routes/mod.rs index 43a7c768a..b595f0690 100644 --- a/packages/ui/api/stellar/tests/routes/mod.rs +++ b/packages/ui/api/stellar/tests/routes/mod.rs @@ -1 +1,2 @@ pub mod health; +pub mod routes; diff --git a/packages/ui/api/stellar/tests/routes/routes.rs b/packages/ui/api/stellar/tests/routes/routes.rs new file mode 100644 index 000000000..bf0695d07 --- /dev/null +++ b/packages/ui/api/stellar/tests/routes/routes.rs @@ -0,0 +1,28 @@ +use actix_web::{test, App}; +use stellar_api::routes::configure_routes; + +#[actix_rt::test] +async fn ai_routes_configure_executes() { + // Simply configure the app with our routes to exercise `routes::configure_routes`. + let _app = test::init_service(App::new().configure(|cfg| configure_routes(cfg))).await; + // If configure runs without panic we've executed the code paths in `routes/mod.rs`. + assert!(true); +} + +#[actix_rt::test] +async fn ai_routes_configure_registers_routes() { + let app = test::init_service(App::new().configure(stellar_api::routes::configure_routes)).await; + + // health endpoint should return 200 + let req = test::TestRequest::get().uri("/health").to_request(); + let resp = test::call_service(&app, req).await; + assert_eq!(resp.status().as_u16(), 200); + + // POST invalid bytes to upgrade-scaffold should return 415 + let req = test::TestRequest::post() + .uri("/upgrade-scaffold") + .set_payload(vec![0u8, 1, 2]) + .to_request(); + let resp = test::call_service(&app, req).await; + assert_eq!(resp.status().as_u16(), 415); +} diff --git a/packages/ui/api/stellar/tests/routes/upgrade_scaffold.rs b/packages/ui/api/stellar/tests/routes/upgrade_scaffold.rs new file mode 100644 index 000000000..e6362273b --- /dev/null +++ b/packages/ui/api/stellar/tests/routes/upgrade_scaffold.rs @@ -0,0 +1,138 @@ +use actix_web::{test, App}; +use std::env; +use std::fs::write; +use std::path::Path; +use tempfile::tempdir; + +use std::io::{Cursor, Write}; +use std::os::unix::fs::PermissionsExt; +use zip::write::FileOptions; +use zip::CompressionMethod; +use zip::ZipWriter; + +use stellar_api::routes::upgrade_scaffold::init as upgrade_init; + +fn make_fake_stellar(dir: &Path, exit_code: i32) -> std::path::PathBuf { + let path = dir.join("stellar"); + let mut f = std::fs::File::create(&path).expect("create exe"); + write!(f, "#!/bin/sh\n").unwrap(); + write!(f, "exit {}\n", exit_code).unwrap(); + let mut perms = f.metadata().unwrap().permissions(); + perms.set_mode(0o755); + std::fs::set_permissions(&path, perms).unwrap(); + path +} + +#[actix_rt::test] +async fn ai_upgrade_route_invalid_zip_returns_415() { + let app = test::init_service(App::new().configure(|cfg| upgrade_init(cfg))).await; + let req = test::TestRequest::post() + .uri("/upgrade-scaffold") + .set_payload(vec![0u8, 1, 2]) + .to_request(); + let resp = test::call_service(&app, req).await; + assert_eq!(resp.status().as_u16(), 415); +} + +#[actix_rt::test] +async fn ai_upgrade_route_internal_error_returns_500() { + // prepare a valid zip but make stellar fail to force internal error + let tmp = tempdir().expect("tmp"); + let root = tmp.path(); + std::fs::create_dir_all(root.join("contracts/proj/src")).unwrap(); + write(root.join("contracts/proj/src/contract.rs"), b"c").unwrap(); + write(root.join("contracts/proj/Cargo.toml"), b"[package]").unwrap(); + write(root.join("Cargo.toml"), b"[workspace]").unwrap(); + + let mut bytes = Vec::new(); + { + let cursor = Cursor::new(&mut bytes); + let mut writer = ZipWriter::new(cursor); + let options = FileOptions::<()>::default().compression_method(CompressionMethod::Deflated); + writer.add_directory("contracts/", options).unwrap(); + writer.add_directory("contracts/proj/", options).unwrap(); + writer + .start_file("contracts/proj/src/contract.rs", options) + .unwrap(); + writer.write_all(b"c").unwrap(); + writer + .start_file("contracts/proj/Cargo.toml", options) + .unwrap(); + writer.write_all(b"[package]").unwrap(); + writer.start_file("Cargo.toml", options).unwrap(); + writer.write_all(b"[workspace]").unwrap(); + writer.finish().unwrap(); + } + + let bin = tmp.path().join("bin"); + std::fs::create_dir_all(&bin).unwrap(); + let _exe = make_fake_stellar(&bin, 2); + let old = env::var_os("PATH"); + let newp = format!("{}:{}", bin.display(), env::var("PATH").unwrap_or_default()); + env::set_var("PATH", &newp); + + let app = test::init_service(App::new().configure(|cfg| upgrade_init(cfg))).await; + let req = test::TestRequest::post() + .uri("/upgrade-scaffold") + .set_payload(bytes) + .to_request(); + let resp = test::call_service(&app, req).await; + + if let Some(v) = old { + env::set_var("PATH", v); + } + + assert_eq!(resp.status().as_u16(), 500); +} + +#[actix_rt::test] +async fn ai_upgrade_route_success_returns_zip() { + let tmp = tempdir().expect("tmp"); + let root = tmp.path(); + std::fs::create_dir_all(root.join("contracts/proj/src")).unwrap(); + write(root.join("contracts/proj/src/contract.rs"), b"c").unwrap(); + write(root.join("contracts/proj/Cargo.toml"), b"[package]").unwrap(); + write(root.join("Cargo.toml"), b"[workspace]").unwrap(); + + let mut bytes = Vec::new(); + { + let cursor = Cursor::new(&mut bytes); + let mut writer = ZipWriter::new(cursor); + let options = FileOptions::<()>::default().compression_method(CompressionMethod::Deflated); + writer.add_directory("contracts/", options).unwrap(); + writer.add_directory("contracts/proj/", options).unwrap(); + writer + .start_file("contracts/proj/src/contract.rs", options) + .unwrap(); + writer.write_all(b"c").unwrap(); + writer + .start_file("contracts/proj/Cargo.toml", options) + .unwrap(); + writer.write_all(b"[package]").unwrap(); + writer.start_file("Cargo.toml", options).unwrap(); + writer.write_all(b"[workspace]").unwrap(); + writer.finish().unwrap(); + } + + let bin = tmp.path().join("bin"); + std::fs::create_dir_all(&bin).unwrap(); + let _exe = make_fake_stellar(&bin, 0); + let old = env::var_os("PATH"); + let newp = format!("{}:{}", bin.display(), env::var("PATH").unwrap_or_default()); + env::set_var("PATH", &newp); + + let app = test::init_service(App::new().configure(|cfg| upgrade_init(cfg))).await; + let req = test::TestRequest::post() + .uri("/upgrade-scaffold") + .set_payload(bytes) + .to_request(); + let resp = test::call_service(&app, req).await; + + if let Some(v) = old { + env::set_var("PATH", v); + } + + assert_eq!(resp.status().as_u16(), 200); + let headers = resp.headers(); + assert!(headers.get("content-type").is_some()); +} diff --git a/packages/ui/api/stellar/tests/tests_paths.rs b/packages/ui/api/stellar/tests/tests_paths.rs index 28dfbdf95..659c1e4d2 100644 --- a/packages/ui/api/stellar/tests/tests_paths.rs +++ b/packages/ui/api/stellar/tests/tests_paths.rs @@ -1,3 +1,9 @@ +#[path = "config/mod.rs"] +mod config; + +#[path = "controllers/mod.rs"] +mod controllers; + #[path = "environment/mod.rs"] mod environment; diff --git a/packages/ui/api/stellar/tests/utils/dir.rs b/packages/ui/api/stellar/tests/utils/dir.rs new file mode 100644 index 000000000..771cb22cf --- /dev/null +++ b/packages/ui/api/stellar/tests/utils/dir.rs @@ -0,0 +1,37 @@ +use std::fs::read_to_string; +use std::io::{Cursor, Read}; +use tempfile::tempdir; + +use stellar_api::utils::{create_dir_safe, write_file_safe}; + +#[test] +fn ai_create_dir_safe_creates_nested() { + let tmp = tempdir().expect("tmp"); + let path = tmp.path().join("a/b/c"); + let res = create_dir_safe(&path); + assert!(res.is_ok()); + assert!(path.is_dir()); +} + +#[test] +fn ai_write_file_safe_writes_and_size_mismatch() { + let tmp = tempdir().expect("tmp"); + let root = tmp.path(); + let target = root.join("file.bin"); + + let data = b"hello"; + let mut reader = Cursor::new(data.as_ref()).take(data.len() as u64); + + let res = write_file_safe(&target, root, data.len() as u64, &mut reader); + assert!(res.is_ok(), "expected write to succeed: {res:?}"); + + let content = read_to_string(&target).expect("read file"); + assert_eq!(content.as_bytes(), data); + + // now test size mismatch + let target2 = root.join("file2.bin"); + let data2 = b"hi"; + let mut reader2 = Cursor::new(data2.as_ref()).take(data2.len() as u64); + let res2 = write_file_safe(&target2, root, (data2.len() + 10) as u64, &mut reader2); + assert!(res2.is_err(), "expected size mismatch error"); +} diff --git a/packages/ui/api/stellar/tests/utils/errors.rs b/packages/ui/api/stellar/tests/utils/errors.rs new file mode 100644 index 000000000..dee313822 --- /dev/null +++ b/packages/ui/api/stellar/tests/utils/errors.rs @@ -0,0 +1,20 @@ +use stellar_api::utils::{to_http_hidden_error, to_io_error, to_zip_io_error}; +use zip::result::ZipError; + +#[test] +fn ai_to_io_and_zip_and_http_error_behaviour() { + let io_err = to_io_error("disk full"); + let io_str = format!("{:?}", io_err); + assert!(io_str.contains("disk full")); + + let zip_err = to_zip_io_error("zip fail"); + match zip_err { + ZipError::Io(e) => assert!(format!("{:?}", e).contains("zip fail")), + _ => panic!("expected ZipError::Io"), + } + + let http_err = to_http_hidden_error("hidden"); + // Ensure we have an actix_web::Error value by formatting it + let h = format!("{:?}", http_err); + assert!(h.contains("Internal Server Error")); +} diff --git a/packages/ui/api/stellar/tests/utils/glob.rs b/packages/ui/api/stellar/tests/utils/glob.rs index a6e960353..d7539d5e7 100644 --- a/packages/ui/api/stellar/tests/utils/glob.rs +++ b/packages/ui/api/stellar/tests/utils/glob.rs @@ -1,7 +1,7 @@ -use stellar_api::utils::{build_globset, is_glob_match}; +use stellar_api::utils::{build_globset, is_glob_match, MatchError}; #[test] -fn test_single_pattern_match() { +fn ai_test_single_pattern_match() { let globset = build_globset(vec!["*.rs".to_string()]).unwrap(); let matcher = globset.matches("main.rs"); assert!(!matcher.is_empty()); @@ -68,3 +68,20 @@ fn test_is_glob_match_invalid_pattern() { let globset = build_globset(vec!["[invalid".to_string()]); assert!(globset.is_err()); } + +#[test] +fn builds_and_matches_globset() { + let patterns = vec!["dir/*.txt".to_string(), "a.txt".to_string()]; + let gs = build_globset(patterns).expect("should build globset"); + + // matching existing pattern + let ok = is_glob_match(&gs, "dir/file.txt"); + assert!(ok.is_ok(), "expected a match for dir/file.txt"); + + // non matching path should return NoMatch + let no = is_glob_match(&gs, "other.bin"); + match no { + Err(MatchError::NoMatch(s)) => assert_eq!(s, "other.bin"), + _ => panic!("expected NoMatch for other.bin"), + } +} diff --git a/packages/ui/api/stellar/tests/utils/mod.rs b/packages/ui/api/stellar/tests/utils/mod.rs index 9ee2e9707..1d3459c7e 100644 --- a/packages/ui/api/stellar/tests/utils/mod.rs +++ b/packages/ui/api/stellar/tests/utils/mod.rs @@ -1 +1,4 @@ +pub mod dir; +pub mod errors; pub mod glob; +pub mod path; diff --git a/packages/ui/api/stellar/tests/utils/path.rs b/packages/ui/api/stellar/tests/utils/path.rs new file mode 100644 index 000000000..2d83a8129 --- /dev/null +++ b/packages/ui/api/stellar/tests/utils/path.rs @@ -0,0 +1,115 @@ +use std::fs::{create_dir_all, File}; +use std::os::unix::fs::symlink; +use std::path::PathBuf; +use tempfile::tempdir; + +use stellar_api::utils::{ + canonicalize_existing_dir, ensure_no_symlinks, expand_with_directories, join_and_assert_inside, +}; + +#[test] +fn expand_with_directories_includes_parents() { + let res = expand_with_directories(&["a/b/c.txt"]); + // should include the file itself and its parent directories + assert!(res.iter().any(|s| s == "a/b/c.txt")); + assert!(res.iter().any(|s| s == "a/b")); + assert!(res.iter().any(|s| s == "a/") || res.iter().any(|s| s == "a")); +} + +#[test] +fn join_and_assert_inside_detects_escape() { + let tmp = tempdir().expect("tmp"); + let root = tmp.path(); + + // An absolute path will make `join` return the absolute path, which should not start with `root` + let outside = PathBuf::from("/abs_evil.txt"); + let res = join_and_assert_inside(root, &outside); + assert!( + res.is_err(), + "expected join_and_assert_inside to fail on absolute path" + ); +} + +#[test] +fn canonicalize_existing_dir_ok_and_err() { + let tmp = tempdir().expect("tmp"); + let path = tmp.path().to_path_buf(); + let ok = canonicalize_existing_dir(&path); + assert!(ok.is_ok()); + + let non = path.join("does_not_exist"); + let e = canonicalize_existing_dir(&non); + assert!(e.is_err()); +} + +#[test] +fn ensure_no_symlinks_detects_parent_and_self_symlink() { + let tmp = tempdir().expect("tmp"); + let root = tmp.path().to_path_buf(); + + // create a real dir and a symlink inside root + create_dir_all(root.join("real")).expect("mkdir real"); + + // create a symlink named linkdir inside root pointing to real + let link = root.join("linkdir"); + symlink(root.join("real"), &link).expect("create symlink"); + + // now attempt to validate a path whose parent is the symlink + let target = link.join("file.txt"); + let res = ensure_no_symlinks(&root, &target); + assert!(res.is_err(), "expected symlink detected in parents"); + + // also test that a symlink at the final path is detected + let file_target = root.join("somefile"); + File::create(&file_target).expect("create file"); + let file_link = root.join("filelink"); + symlink(&file_target, &file_link).expect("create file symlink"); + + let res2 = ensure_no_symlinks(&root, &file_link); + assert!(res2.is_err(), "expected symlink detected on final path"); +} + +#[test] +fn ai_join_and_assert_inside_success() { + let tmp = tempdir().expect("tmp"); + let root = tmp.path(); + let inside = PathBuf::from("subdir/file.txt"); + let full = root.join(&inside); + create_dir_all(full.parent().unwrap()).unwrap(); + File::create(&full).unwrap(); + + let res = join_and_assert_inside(root, &inside); + assert!(res.is_ok()); + let got = res.unwrap(); + assert!(got.starts_with(root)); +} + +#[test] +fn ai_canonicalize_existing_dir_on_file_returns_err() { + let tmp = tempdir().expect("tmp"); + let f = tmp.path().join("afile"); + File::create(&f).unwrap(); + let res = canonicalize_existing_dir(&f); + assert!(res.is_err()); +} + +#[test] +fn ai_ensure_no_symlinks_ok() { + let tmp = tempdir().expect("tmp"); + let root = tmp.path().to_path_buf(); + create_dir_all(root.join("a/b")).unwrap(); + let target = root.join("a/b/c.txt"); + File::create(&target).unwrap(); + let res = ensure_no_symlinks(&root, &target); + assert!(res.is_ok()); +} + +#[test] +fn ai_expand_with_directories_handles_dot_and_backslash() { + let items = expand_with_directories(&["./a/b/c.txt", "dir\\file.txt"]); + assert!(items.iter().any(|s| s.ends_with("a/b/c.txt"))); + // backslash should be normalized to forward slash somewhere in the output + assert!(items + .iter() + .any(|s| s.contains("dir/") || s.contains("dir\\"))); +} diff --git a/packages/ui/src/common/Wiz.svelte b/packages/ui/src/common/Wiz.svelte index 1317d2da5..3aab8ee62 100644 --- a/packages/ui/src/common/Wiz.svelte +++ b/packages/ui/src/common/Wiz.svelte @@ -11,13 +11,19 @@ previousOptions: TOption, aiFunctionCall: AiFunctionCall, ): TOption => - Object.keys(previousOptions).reduce( - (acc, currentKey) => { - if (aiFunctionCall.name === currentKey) - return { ...acc, [currentKey]: { ...acc[currentKey], ...aiFunctionCall.arguments } }; + (Object.keys(previousOptions) as Array).reduce( + (acc: TOption, currentKey: keyof TOption) => { + if ((aiFunctionCall.name as unknown as keyof TOption) === currentKey) + return { + ...acc, + [currentKey]: { + ...(acc[currentKey] as Record), + ...(aiFunctionCall.arguments as Record), + }, + } as TOption; else return acc; }, - { ...previousOptions }, + { ...previousOptions } as TOption, ); export function createWiz() { diff --git a/packages/ui/src/solidity/overrides.ts b/packages/ui/src/solidity/overrides.ts index 90360f316..74718445e 100644 --- a/packages/ui/src/solidity/overrides.ts +++ b/packages/ui/src/solidity/overrides.ts @@ -1,7 +1,7 @@ import type { GenericOptions, Kind } from '@openzeppelin/wizard'; import type { ComponentType } from 'svelte'; -import type { SupportedLanguage } from '../../api/ai-assistant/types/languages'; import type { Language } from '../common/languages-types'; +import type { SupportedLanguage } from '../../api/ai/ai-assistant/types/languages'; /** * For ecosystem Wizard apps that inherit the Solidity Wizard, they can override specific features in the UI. From 293ff4bdd632a0ffa11bf338829e7d6b7ae7be70 Mon Sep 17 00:00:00 2001 From: CoveMB Date: Wed, 14 Jan 2026 13:43:07 -0500 Subject: [PATCH 15/22] merge master --- .github/workflows/docker-prod.yaml | 5 +++++ .github/workflows/docker-stg.yaml | 9 +++++---- packages/ui/rollup.config.mjs | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-prod.yaml b/.github/workflows/docker-prod.yaml index ec0fbaae3..76408f4bf 100644 --- a/.github/workflows/docker-prod.yaml +++ b/.github/workflows/docker-prod.yaml @@ -1,6 +1,11 @@ name: (Production) Build and Deploy on: + push: + branches: + - stellar-scaffold + paths: + - "packages/ui/api/**" workflow_dispatch: permissions: diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index 60475c123..8b73362ca 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -2,15 +2,15 @@ name: (Staging) Build and Deploy on: push: - branches: [master] paths: - - 'packages/ui/api/**' + - "packages/ui/api/**" workflow_dispatch: inputs: branch: - description: 'Branch to build from' + description: "Branch to build from" required: true - default: 'master' + # default: master TODO + default: "stellar-scaffold" type: string permissions: @@ -68,6 +68,7 @@ jobs: runs-on: ubuntu-latest needs: build-and-push env: + DEPLOYMENT_URL: https://wizard-api-stg.openzeppelin.com/ ROLE_FOR_OIDC: "${{ secrets.ROLE_FOR_OIDC }}" ROLE_TO_ASSUME: "${{ secrets.ROLE_TO_ASSUME }}" ECS_CLUSTER: ${{ vars.ECS_STG_CLUSTER }} diff --git a/packages/ui/rollup.config.mjs b/packages/ui/rollup.config.mjs index 9c38a8449..db30204e9 100644 --- a/packages/ui/rollup.config.mjs +++ b/packages/ui/rollup.config.mjs @@ -130,7 +130,7 @@ export default [ 'process.env.NODE_DEBUG': JSON.stringify(process.env.NODE_DEBUG), 'process.env.API_HOST': JSON.stringify(production ? '' : `http://localhost:${process.env.API_PORT || 3000}`), 'process.env.FARGATE_HOST': JSON.stringify( - production ? 'TODO' : `http://localhost:${process.env.FARGATE_PORT || 8888}`, + production ? 'https://wizard-api.openzeppelin.com' : `http://localhost:${process.env.FARGATE_PORT || 8888}`, ), }), From e1b5ceea98cf86a4b39046a88adbc492ddc691ad Mon Sep 17 00:00:00 2001 From: CoveMB Date: Wed, 14 Jan 2026 15:26:37 -0500 Subject: [PATCH 16/22] Add origin --- .github/workflows/docker-prod.yaml | 3 +++ .github/workflows/docker-stg.yaml | 3 +++ packages/ui/api/stellar/Dockerfile.prod | 2 ++ packages/ui/api/stellar/src/config/server.rs | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-prod.yaml b/.github/workflows/docker-prod.yaml index 76408f4bf..2c945e1ef 100644 --- a/.github/workflows/docker-prod.yaml +++ b/.github/workflows/docker-prod.yaml @@ -24,6 +24,7 @@ jobs: REGISTRY: ${{ vars.DOCKER_REGISTRY }} ROLE_FOR_OIDC: "${{ secrets.ROLE_FOR_OIDC }}" ROLE_TO_ASSUME: "${{ secrets.ROLE_TO_ASSUME }}" + WIZARD_ORIGIN: https://wizard.openzeppelin.com steps: - name: Harden the runner (Audit all outbound calls) uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 @@ -58,6 +59,8 @@ jobs: ${{ env.REGISTRY }}/wizard-api-prod:${{ github.sha }} cache-from: type=gha cache-to: type=gha,mode=max + build-args: | + WIZARD_ORIGIN=${{ env.WIZARD_ORIGIN }} deploy: runs-on: ubuntu-latest diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index 8b73362ca..b0514f3a9 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -29,6 +29,7 @@ jobs: REGISTRY: ${{ vars.DOCKER_REGISTRY }} ROLE_FOR_OIDC: "${{ secrets.ROLE_FOR_OIDC }}" ROLE_TO_ASSUME: "${{ secrets.ROLE_TO_ASSUME }}" + WIZARD_ORIGIN: https://wizard-stg.openzeppelin.com steps: - name: Harden the runner (Audit all outbound calls) uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 @@ -63,6 +64,8 @@ jobs: ${{ env.REGISTRY }}/wizard-api-stg:${{ github.sha }} cache-from: type=gha cache-to: type=gha,mode=max + build-args: | + WIZARD_ORIGIN=${{ env.WIZARD_ORIGIN }} deploy: runs-on: ubuntu-latest diff --git a/packages/ui/api/stellar/Dockerfile.prod b/packages/ui/api/stellar/Dockerfile.prod index d5f7bc757..08e88ebca 100644 --- a/packages/ui/api/stellar/Dockerfile.prod +++ b/packages/ui/api/stellar/Dockerfile.prod @@ -32,6 +32,7 @@ RUN TMPDIR=/opt/tmp cargo build --release RUN strip /opt/target/release/stellar-api || true FROM rust:bookworm AS runtime +ARG WIZARD_ORIGIN ENV DEBIAN_FRONTEND=noninteractive WORKDIR /usr/local/bin @@ -58,5 +59,6 @@ USER appuser EXPOSE 8888 ENV RUST_LOG=info +ENV WIZARD_ORIGIN=${WIZARD_ORIGIN} ENTRYPOINT ["stellar-api"] \ No newline at end of file diff --git a/packages/ui/api/stellar/src/config/server.rs b/packages/ui/api/stellar/src/config/server.rs index 02b8efa02..62aebea3b 100644 --- a/packages/ui/api/stellar/src/config/server.rs +++ b/packages/ui/api/stellar/src/config/server.rs @@ -32,7 +32,7 @@ impl ServerConfig { .parse() .unwrap_or(100), wizard_origin: env::var("WIZARD_ORIGIN") - .unwrap_or_else(|_| "http://localhost:8080".to_string()), + .unwrap_or_else(|_| "https://wizard.openzeppelin.com".to_string()), } } } From 06c97639854f4cc2217b950b71bdc3e33437bef6 Mon Sep 17 00:00:00 2001 From: CoveMB Date: Wed, 14 Jan 2026 15:45:32 -0500 Subject: [PATCH 17/22] Add workflow dispatch --- .github/workflows/docker-prod.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/docker-prod.yaml b/.github/workflows/docker-prod.yaml index 2c945e1ef..e26527e95 100644 --- a/.github/workflows/docker-prod.yaml +++ b/.github/workflows/docker-prod.yaml @@ -7,6 +7,12 @@ on: paths: - "packages/ui/api/**" workflow_dispatch: + inputs: + branch: + description: "Branch to build from" + required: true + default: master + type: string permissions: contents: read From 476c5d373f2dee091df78e91be5001f344d60ade Mon Sep 17 00:00:00 2001 From: CoveMB Date: Wed, 14 Jan 2026 15:45:43 -0500 Subject: [PATCH 18/22] Add workflow dispatch --- .github/workflows/docker-stg.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index b0514f3a9..12cd38de3 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -9,8 +9,7 @@ on: branch: description: "Branch to build from" required: true - # default: master TODO - default: "stellar-scaffold" + default: master type: string permissions: From 379fa770dfd073eeb09edbda3a45aaee7a7c81ed Mon Sep 17 00:00:00 2001 From: CoveMB Date: Wed, 14 Jan 2026 16:03:22 -0500 Subject: [PATCH 19/22] remove leftover --- .github/workflows/docker-stg.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index 12cd38de3..ff815cf9b 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -70,7 +70,6 @@ jobs: runs-on: ubuntu-latest needs: build-and-push env: - DEPLOYMENT_URL: https://wizard-api-stg.openzeppelin.com/ ROLE_FOR_OIDC: "${{ secrets.ROLE_FOR_OIDC }}" ROLE_TO_ASSUME: "${{ secrets.ROLE_TO_ASSUME }}" ECS_CLUSTER: ${{ vars.ECS_STG_CLUSTER }} From eae632ab9832b356e86c53b856962e799dda1b93 Mon Sep 17 00:00:00 2001 From: CoveMB Date: Wed, 14 Jan 2026 16:07:29 -0500 Subject: [PATCH 20/22] deploy from stellar branch --- .github/workflows/docker-prod.yaml | 1 + .github/workflows/docker-stg.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/docker-prod.yaml b/.github/workflows/docker-prod.yaml index e26527e95..e5e1a568c 100644 --- a/.github/workflows/docker-prod.yaml +++ b/.github/workflows/docker-prod.yaml @@ -4,6 +4,7 @@ on: push: branches: - stellar-scaffold + - master paths: - "packages/ui/api/**" workflow_dispatch: diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index ff815cf9b..38efd1057 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -2,6 +2,9 @@ name: (Staging) Build and Deploy on: push: + branches: + - stellar-scaffold + - master paths: - "packages/ui/api/**" workflow_dispatch: From 841e8eadaeb3fc18611d5852c5bbe5d5d73aef5f Mon Sep 17 00:00:00 2001 From: CoveMB Date: Wed, 14 Jan 2026 16:36:05 -0500 Subject: [PATCH 21/22] deploy from stellar branch --- packages/ui/api/ai/deno.lock | 84 ++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/packages/ui/api/ai/deno.lock b/packages/ui/api/ai/deno.lock index d1459b48c..548eafa4d 100644 --- a/packages/ui/api/ai/deno.lock +++ b/packages/ui/api/ai/deno.lock @@ -1,6 +1,90 @@ { "version": "3", + "redirects": { + "https://deno.land/std/fmt/colors.ts": "https://deno.land/std@0.224.0/fmt/colors.ts", + "https://deno.land/std/path/mod.ts": "https://deno.land/std@0.224.0/path/mod.ts" + }, "remote": { + "https://deno.land/std@0.224.0/assert/assert.ts": "09d30564c09de846855b7b071e62b5974b001bb72a4b797958fe0660e7849834", + "https://deno.land/std@0.224.0/assert/assertion_error.ts": "ba8752bd27ebc51f723702fac2f54d3e94447598f54264a6653d6413738a8917", + "https://deno.land/std@0.224.0/fmt/colors.ts": "508563c0659dd7198ba4bbf87e97f654af3c34eb56ba790260f252ad8012e1c5", + "https://deno.land/std@0.224.0/path/_common/assert_path.ts": "dbdd757a465b690b2cc72fc5fb7698c51507dec6bfafce4ca500c46b76ff7bd8", + "https://deno.land/std@0.224.0/path/_common/basename.ts": "569744855bc8445f3a56087fd2aed56bdad39da971a8d92b138c9913aecc5fa2", + "https://deno.land/std@0.224.0/path/_common/common.ts": "ef73c2860694775fe8ffcbcdd387f9f97c7a656febf0daa8c73b56f4d8a7bd4c", + "https://deno.land/std@0.224.0/path/_common/constants.ts": "dc5f8057159f4b48cd304eb3027e42f1148cf4df1fb4240774d3492b5d12ac0c", + "https://deno.land/std@0.224.0/path/_common/dirname.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", + "https://deno.land/std@0.224.0/path/_common/format.ts": "92500e91ea5de21c97f5fe91e178bae62af524b72d5fcd246d6d60ae4bcada8b", + "https://deno.land/std@0.224.0/path/_common/from_file_url.ts": "d672bdeebc11bf80e99bf266f886c70963107bdd31134c4e249eef51133ceccf", + "https://deno.land/std@0.224.0/path/_common/glob_to_reg_exp.ts": "6cac16d5c2dc23af7d66348a7ce430e5de4e70b0eede074bdbcf4903f4374d8d", + "https://deno.land/std@0.224.0/path/_common/normalize.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", + "https://deno.land/std@0.224.0/path/_common/normalize_string.ts": "33edef773c2a8e242761f731adeb2bd6d683e9c69e4e3d0092985bede74f4ac3", + "https://deno.land/std@0.224.0/path/_common/relative.ts": "faa2753d9b32320ed4ada0733261e3357c186e5705678d9dd08b97527deae607", + "https://deno.land/std@0.224.0/path/_common/strip_trailing_separators.ts": "7024a93447efcdcfeaa9339a98fa63ef9d53de363f1fbe9858970f1bba02655a", + "https://deno.land/std@0.224.0/path/_common/to_file_url.ts": "7f76adbc83ece1bba173e6e98a27c647712cab773d3f8cbe0398b74afc817883", + "https://deno.land/std@0.224.0/path/_interface.ts": "8dfeb930ca4a772c458a8c7bbe1e33216fe91c253411338ad80c5b6fa93ddba0", + "https://deno.land/std@0.224.0/path/_os.ts": "8fb9b90fb6b753bd8c77cfd8a33c2ff6c5f5bc185f50de8ca4ac6a05710b2c15", + "https://deno.land/std@0.224.0/path/basename.ts": "7ee495c2d1ee516ffff48fb9a93267ba928b5a3486b550be73071bc14f8cc63e", + "https://deno.land/std@0.224.0/path/common.ts": "03e52e22882402c986fe97ca3b5bb4263c2aa811c515ce84584b23bac4cc2643", + "https://deno.land/std@0.224.0/path/constants.ts": "0c206169ca104938ede9da48ac952de288f23343304a1c3cb6ec7625e7325f36", + "https://deno.land/std@0.224.0/path/dirname.ts": "85bd955bf31d62c9aafdd7ff561c4b5fb587d11a9a5a45e2b01aedffa4238a7c", + "https://deno.land/std@0.224.0/path/extname.ts": "593303db8ae8c865cbd9ceec6e55d4b9ac5410c1e276bfd3131916591b954441", + "https://deno.land/std@0.224.0/path/format.ts": "6ce1779b0980296cf2bc20d66436b12792102b831fd281ab9eb08fa8a3e6f6ac", + "https://deno.land/std@0.224.0/path/from_file_url.ts": "911833ae4fd10a1c84f6271f36151ab785955849117dc48c6e43b929504ee069", + "https://deno.land/std@0.224.0/path/glob_to_regexp.ts": "7f30f0a21439cadfdae1be1bf370880b415e676097fda584a63ce319053b5972", + "https://deno.land/std@0.224.0/path/is_absolute.ts": "4791afc8bfd0c87f0526eaa616b0d16e7b3ab6a65b62942e50eac68de4ef67d7", + "https://deno.land/std@0.224.0/path/is_glob.ts": "a65f6195d3058c3050ab905705891b412ff942a292bcbaa1a807a74439a14141", + "https://deno.land/std@0.224.0/path/join.ts": "ae2ec5ca44c7e84a235fd532e4a0116bfb1f2368b394db1c4fb75e3c0f26a33a", + "https://deno.land/std@0.224.0/path/join_globs.ts": "5b3bf248b93247194f94fa6947b612ab9d3abd571ca8386cf7789038545e54a0", + "https://deno.land/std@0.224.0/path/mod.ts": "f6bd79cb08be0e604201bc9de41ac9248582699d1b2ee0ab6bc9190d472cf9cd", + "https://deno.land/std@0.224.0/path/normalize.ts": "4155743ccceeed319b350c1e62e931600272fad8ad00c417b91df093867a8352", + "https://deno.land/std@0.224.0/path/normalize_glob.ts": "cc89a77a7d3b1d01053b9dcd59462b75482b11e9068ae6c754b5cf5d794b374f", + "https://deno.land/std@0.224.0/path/parse.ts": "77ad91dcb235a66c6f504df83087ce2a5471e67d79c402014f6e847389108d5a", + "https://deno.land/std@0.224.0/path/posix/_util.ts": "1e3937da30f080bfc99fe45d7ed23c47dd8585c5e473b2d771380d3a6937cf9d", + "https://deno.land/std@0.224.0/path/posix/basename.ts": "d2fa5fbbb1c5a3ab8b9326458a8d4ceac77580961b3739cd5bfd1d3541a3e5f0", + "https://deno.land/std@0.224.0/path/posix/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4", + "https://deno.land/std@0.224.0/path/posix/constants.ts": "93481efb98cdffa4c719c22a0182b994e5a6aed3047e1962f6c2c75b7592bef1", + "https://deno.land/std@0.224.0/path/posix/dirname.ts": "76cd348ffe92345711409f88d4d8561d8645353ac215c8e9c80140069bf42f00", + "https://deno.land/std@0.224.0/path/posix/extname.ts": "e398c1d9d1908d3756a7ed94199fcd169e79466dd88feffd2f47ce0abf9d61d2", + "https://deno.land/std@0.224.0/path/posix/format.ts": "185e9ee2091a42dd39e2a3b8e4925370ee8407572cee1ae52838aed96310c5c1", + "https://deno.land/std@0.224.0/path/posix/from_file_url.ts": "951aee3a2c46fd0ed488899d024c6352b59154c70552e90885ed0c2ab699bc40", + "https://deno.land/std@0.224.0/path/posix/glob_to_regexp.ts": "76f012fcdb22c04b633f536c0b9644d100861bea36e9da56a94b9c589a742e8f", + "https://deno.land/std@0.224.0/path/posix/is_absolute.ts": "cebe561ad0ae294f0ce0365a1879dcfca8abd872821519b4fcc8d8967f888ede", + "https://deno.land/std@0.224.0/path/posix/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", + "https://deno.land/std@0.224.0/path/posix/join.ts": "7fc2cb3716aa1b863e990baf30b101d768db479e70b7313b4866a088db016f63", + "https://deno.land/std@0.224.0/path/posix/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", + "https://deno.land/std@0.224.0/path/posix/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604", + "https://deno.land/std@0.224.0/path/posix/normalize.ts": "baeb49816a8299f90a0237d214cef46f00ba3e95c0d2ceb74205a6a584b58a91", + "https://deno.land/std@0.224.0/path/posix/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", + "https://deno.land/std@0.224.0/path/posix/parse.ts": "09dfad0cae530f93627202f28c1befa78ea6e751f92f478ca2cc3b56be2cbb6a", + "https://deno.land/std@0.224.0/path/posix/relative.ts": "3907d6eda41f0ff723d336125a1ad4349112cd4d48f693859980314d5b9da31c", + "https://deno.land/std@0.224.0/path/posix/resolve.ts": "08b699cfeee10cb6857ccab38fa4b2ec703b0ea33e8e69964f29d02a2d5257cf", + "https://deno.land/std@0.224.0/path/posix/to_file_url.ts": "7aa752ba66a35049e0e4a4be5a0a31ac6b645257d2e031142abb1854de250aaf", + "https://deno.land/std@0.224.0/path/posix/to_namespaced_path.ts": "28b216b3c76f892a4dca9734ff1cc0045d135532bfd9c435ae4858bfa5a2ebf0", + "https://deno.land/std@0.224.0/path/relative.ts": "ab739d727180ed8727e34ed71d976912461d98e2b76de3d3de834c1066667add", + "https://deno.land/std@0.224.0/path/resolve.ts": "a6f977bdb4272e79d8d0ed4333e3d71367cc3926acf15ac271f1d059c8494d8d", + "https://deno.land/std@0.224.0/path/to_file_url.ts": "88f049b769bce411e2d2db5bd9e6fd9a185a5fbd6b9f5ad8f52bef517c4ece1b", + "https://deno.land/std@0.224.0/path/to_namespaced_path.ts": "b706a4103b104cfadc09600a5f838c2ba94dbcdb642344557122dda444526e40", + "https://deno.land/std@0.224.0/path/windows/_util.ts": "d5f47363e5293fced22c984550d5e70e98e266cc3f31769e1710511803d04808", + "https://deno.land/std@0.224.0/path/windows/basename.ts": "6bbc57bac9df2cec43288c8c5334919418d784243a00bc10de67d392ab36d660", + "https://deno.land/std@0.224.0/path/windows/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4", + "https://deno.land/std@0.224.0/path/windows/constants.ts": "5afaac0a1f67b68b0a380a4ef391bf59feb55856aa8c60dfc01bd3b6abb813f5", + "https://deno.land/std@0.224.0/path/windows/dirname.ts": "33e421be5a5558a1346a48e74c330b8e560be7424ed7684ea03c12c21b627bc9", + "https://deno.land/std@0.224.0/path/windows/extname.ts": "165a61b00d781257fda1e9606a48c78b06815385e7d703232548dbfc95346bef", + "https://deno.land/std@0.224.0/path/windows/format.ts": "bbb5ecf379305b472b1082cd2fdc010e44a0020030414974d6029be9ad52aeb6", + "https://deno.land/std@0.224.0/path/windows/from_file_url.ts": "ced2d587b6dff18f963f269d745c4a599cf82b0c4007356bd957cb4cb52efc01", + "https://deno.land/std@0.224.0/path/windows/glob_to_regexp.ts": "e45f1f89bf3fc36f94ab7b3b9d0026729829fabc486c77f414caebef3b7304f8", + "https://deno.land/std@0.224.0/path/windows/is_absolute.ts": "4a8f6853f8598cf91a835f41abed42112cebab09478b072e4beb00ec81f8ca8a", + "https://deno.land/std@0.224.0/path/windows/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", + "https://deno.land/std@0.224.0/path/windows/join.ts": "8d03530ab89195185103b7da9dfc6327af13eabdcd44c7c63e42e27808f50ecf", + "https://deno.land/std@0.224.0/path/windows/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", + "https://deno.land/std@0.224.0/path/windows/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604", + "https://deno.land/std@0.224.0/path/windows/normalize.ts": "78126170ab917f0ca355a9af9e65ad6bfa5be14d574c5fb09bb1920f52577780", + "https://deno.land/std@0.224.0/path/windows/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", + "https://deno.land/std@0.224.0/path/windows/parse.ts": "08804327b0484d18ab4d6781742bf374976de662f8642e62a67e93346e759707", + "https://deno.land/std@0.224.0/path/windows/relative.ts": "3e1abc7977ee6cc0db2730d1f9cb38be87b0ce4806759d271a70e4997fc638d7", + "https://deno.land/std@0.224.0/path/windows/resolve.ts": "8dae1dadfed9d46ff46cc337c9525c0c7d959fb400a6308f34595c45bdca1972", + "https://deno.land/std@0.224.0/path/windows/to_file_url.ts": "40e560ee4854fe5a3d4d12976cef2f4e8914125c81b11f1108e127934ced502e", + "https://deno.land/std@0.224.0/path/windows/to_namespaced_path.ts": "4ffa4fb6fae321448d5fe810b3ca741d84df4d7897e61ee29be961a6aac89a4c", "https://esm.sh/@upstash/redis@1.35.6": "18026bc0000af7b6b158f6e2ff7ae244c9745da61b9302e176479f8b3bc145dd", "https://esm.sh/openai@5.23.2": "18c9a853acea5ea20099acc7af13d1f90de40e60d072138257f6cee73131cee2" } From 85134f73fc8fa7d12e0adbbae01f6ed468c490f4 Mon Sep 17 00:00:00 2001 From: CoveMB Date: Wed, 14 Jan 2026 16:38:26 -0500 Subject: [PATCH 22/22] deploy from stellar branch --- .github/workflows/docker-prod.yaml | 5 +++-- .github/workflows/docker-stg.yaml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-prod.yaml b/.github/workflows/docker-prod.yaml index e5e1a568c..fda7622b9 100644 --- a/.github/workflows/docker-prod.yaml +++ b/.github/workflows/docker-prod.yaml @@ -5,8 +5,9 @@ on: branches: - stellar-scaffold - master - paths: - - "packages/ui/api/**" + # TODO enable + # paths: + # - "packages/ui/api/**" workflow_dispatch: inputs: branch: diff --git a/.github/workflows/docker-stg.yaml b/.github/workflows/docker-stg.yaml index 38efd1057..7ce161fea 100644 --- a/.github/workflows/docker-stg.yaml +++ b/.github/workflows/docker-stg.yaml @@ -5,8 +5,9 @@ on: branches: - stellar-scaffold - master - paths: - - "packages/ui/api/**" + # TODO enable + # paths: + # - "packages/ui/api/**" workflow_dispatch: inputs: branch: