6 Commits

Author SHA1 Message Date
Evi Nova
bc4e52bb1e Refactor/multitiered multisig roles (#1483)
* refactor: switch to multitiered governance with multisigs

* feat: add scripts for assisting with upgrading contracts and

* test: add tests for governance upgrade

* chore: install Foundry with Hardhat compatability

* fix: add separate intializeGovernance function for upgrading

Uses reinitializer modifier for proper security around function call

* feat: migrate new function to AccessControl governance

* test: full end to end upgrade typescript test

* chore: add hardhat-upgrade

* chore: add foundry outputs to gitignore

* test: add Foundry upgrade script and test for deployed contracts

* refactor: update PCR0 inputs to be 32 bytes for GCP image hashes

Still pad to 48 bytes to ensure compatibility with mobile app.

* feat: add PCR0 migration script + test file

* fix: use custom natspec to prevent constructor warnings on upgrade

* test: cleanup tests and add role transfer to upgrade script

* test: add deployed libraries to foundry.toml for proper library linking

* chore: add /contracts/broadcast to gitignore for foundry deployments

* fix: set variable in initializer instead of defining in declaration

* test: improve upgrade test script to check all state variables

* docs: better explain safety behind using unsafeSkipStorageCheck

* doc: add guide for upgrading to AccessControl governance

* style: change multisig role names

CRITICAL_ROLE -> SECURITY_ROLE (3/5)
STANDARD_ROLE -> OPERATIONRS_ROLE (2/5)

* refactor: change OFAC + CSCA root update functions to 2/5 multisig

* fix: package version clashes + outdated code from old ver of packages

OpenZeppelin v5.5.0 no longer requires __UUPS_Upgradeable_Init, new OZ version requires opcodes that need cancun evmVersion, hard defining @noble/hashes led to clashes with other dependencies

* fix: fix PCR0 tests broken from change in byte size

* feat: add contract upgrade tooling with Safe multisig integration

- Add unified 'upgrade' Hardhat task with automatic safety checks
- Add deployment registry for version tracking
- Add Safe SDK integration for auto-proposing upgrades
- Update UPGRADE_GUIDE.md with new workflow documentation
- Validate version increments, reinitializer, and storage layout

* fix: revert fix on Hub V1 contract that is not supported

* style: update upgraded contracts to not use custom:version-history

* fix: V1 test requires old style as well

* fix: correct registry currentVersion to reflect actual deployed versions

On-chain verification confirmed all contracts are using OLD Ownable2StepUpgradeable:
- Hub: 2.11.0 (was incorrectly 2.12.0)
- Registry: 1.1.0 (was incorrectly 1.2.0)
- IdCard: 1.1.0 (was incorrectly 1.2.0)
- Aadhaar: 1.1.0 (was incorrectly 1.2.0)

Owner address: 0xcaee7aaf115f04d836e2d362a7c07f04db436bd0

* fix: upgrade script now correctly handles pre-defined versions in registry

When upgrading to a version that already exists in registry.json (like 2.12.0),
the script now uses that version's initializerVersion instead of incrementing
from the latest version. This fixes the reinitializer validation for the
governance upgrade.

* fix: upgrade script handles Ownable contracts and outputs transaction data

- Detect Ownable pattern before creating Safe proposals
- Output transaction data for owner direct execution in --prepare-only mode
- Use initializerFunction from registry (initializeGovernance) instead of constructing names
- Skip Safe proposal creation for initial Ownable → AccessControl upgrade
- After upgrade, owner grants SECURITY_ROLE to Safe for future upgrades

* feat: IdentityVerificationHub v2.12.0 deployed on Celo

- Implementation: 0x05FB9D7830889cc389E88198f6A224eA87F01151
- Changelog: Governance upgrade

* feat: IdentityRegistryIdCard v1.2.0 deployed on Celo

- Implementation: 0x7d5e4b7D4c3029aF134D50642674Af8F875118a4
- Changelog: Governance upgrade

* feat: IdentityRegistryAadhaar v1.2.0 deployed on Celo

- Implementation: 0xbD861A9cecf7B0A9631029d55A8CE1155e50697c
- Changelog: Governance upgrade

* feat: IdentityRegistry v1.2.0 deployed on Celo

- Implementation: 0x81E7F74560FAF7eE8DE3a36A5a68B6cbc429Cd36
- Changelog: Governance upgrade

* feat: add multisig addresses to registry

* feat: PCR0Manager v1.2.0 deployed on Celo

- Implementation: 0x9743fe2C1c3D2b068c56dE314e9B10DA9c904717
- Changelog: Governance upgrade

* refactor: cleanup old scripts

* chore: yarn prettier formatting
2025-12-10 17:30:50 +10:00
Justin Hernandez
077dcc47b4 [SELF-830] feat: demo app nfc scanning (#1236)
* save wip demo app nfc scanning

* save wip

* fix types

* Fix Android NFC scanning in demo app (#1241)

* fix tests

* fix pipelines

* fix linting

* WIP move to flows/onboarding/scan-nfc

* prettier and fix test

* fix test

* update lock

* update deps

* Feat/android prebuilt modules (#1292)

* move entire screen

* remove redundancy in components and utils

* fixes

* lint

* ignore

* remove unneeded

* fix imports

* remove unused

* Update packages/mobile-sdk-alpha/src/types/events.ts

Co-authored-by: Aaron DeRuvo <aaron.deruvo@clabs.co>

* uuid not needed for demo app

* android: update ci check

* timeout fix, image temp fix

* prettier fix

* try rebuild deps every time

* Temporarily disable cache check in CI

* Revert "try rebuild deps every time"

This reverts commit a5c97210a5.

* ignore false positive

* Revert "Revert "try rebuild deps every time""

This reverts commit 4f44615fd6.

* fix?

* sanitize error message first

* remove TODO that has been taken care of

* MSDK: add ios prebuilts (#1308)

* add ios prebuilt

* remove outdate readme

* remove duplicates

* comment out unused

* add prettier ignore

* Update .gitguardian.yml to ignore iOS frameworks and build artifacts

* update gitguardian ignore paths

* migrate config version

* add ignored-matches

---------

Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>

* remove duplicated code

* exclude mobile-sdk native modules when `E2E_TESTING` flag is set

* app: disable ios msdk auto-linking

* add E2E_TESTING flag

---------

Co-authored-by: Leszek Stachowski <leszek.stachowski@self.xyz>
Co-authored-by: seshanthS <seshanth@protonmail.com>
Co-authored-by: Seshanth.S <35675963+seshanthS@users.noreply.github.com>
Co-authored-by: Aaron DeRuvo <aaron.deruvo@clabs.co>
2025-10-23 23:14:32 +05:30
turboblitz
24545b7de2 remove client-side proving (#20)
Co-authored-by: turnoffthiscomputer <colin.remi07@gmail.com>
Co-authored-by: seshanthS <seshanth@protonmail.com>
Co-authored-by: thomas-senechal <thomas.senechal@pm.me>
Co-authored-by: motemotech <i.am.nicoshark@gmail.com>
Co-authored-by: turnoffthiscomputer <98749896+remicolin@users.noreply.github.com>
Co-authored-by: ayman <aymanshaik1015@gmail.com>
Co-authored-by: Nicolas Brugneaux <nicolas.brugneaux@gmail.com>
2025-02-05 11:24:26 +01:00
0xturboblitz
df0ac90af7 Adding witnesscalc + rapidsnark build flows for PoP circuit
- Copying the whole witnesscalc repo in `app`
- Using git submodule for `nlohmann/json`, might switch later to script that clones the repo if it's simpler
- Currently not supporting download of zkey, so it temporarily has to be built and copied first
- Keeping artifacts of their AuthV2 circuit for reference
2024-04-03 11:21:30 -07:00
Youssef El Saadany
77490b59b5 re-added passport-reader 2023-07-22 14:28:32 +02:00
Youssef El Saadany
46b1cfe5c1 adding submodules 2023-07-22 13:28:44 +02:00