mirror of
https://github.com/selfxyz/self.git
synced 2026-01-07 22:04:03 -05:00
* 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
75 lines
3.5 KiB
JSON
75 lines
3.5 KiB
JSON
{
|
|
"name": "self-workspace-root",
|
|
"workspaces": {
|
|
"packages": [
|
|
"app",
|
|
"circuits",
|
|
"common",
|
|
"contracts",
|
|
"packages/*",
|
|
"prover/tests",
|
|
"scripts/tests",
|
|
"sdk/*"
|
|
]
|
|
},
|
|
"scripts": {
|
|
"build": "yarn workspaces foreach --topological-dev --parallel --exclude @selfxyz/contracts --exclude @selfxyz/circuits --exclude mobile-sdk-demo -i --all run build",
|
|
"build:demo": "yarn workspace mobile-sdk-demo build",
|
|
"build:mobile-sdk": "yarn workspace @selfxyz/mobile-sdk-alpha build",
|
|
"check:versions": "node scripts/check-package-versions.mjs",
|
|
"demo:mobile": "yarn build:mobile-sdk && yarn build:demo && yarn workspace mobile-sdk-demo start",
|
|
"format": "SKIP_BUILD_DEPS=1 yarn format:root && yarn format:github && SKIP_BUILD_DEPS=1 yarn workspaces foreach --parallel -i --all --exclude self-workspace-root run format",
|
|
"format:github": "yarn prettier --parser yaml --write .github/**/*.yml --single-quote false",
|
|
"format:root": "echo 'format markdown' && yarn prettier --parser markdown --write *.md && echo 'format yaml' && yarn prettier --parser yaml --write .*.{yml,yaml} --single-quote false && yarn prettier --write scripts/**/*.{js,mjs,ts} && yarn prettier --parser json --write scripts/**/*.json",
|
|
"gitleaks": "gitleaks protect --staged --redact --config=gitleaks-override.toml",
|
|
"postinstall": "node scripts/run-patch-package.cjs",
|
|
"lint": "yarn lint:headers && yarn workspaces foreach --parallel -i --all --exclude self-workspace-root run lint",
|
|
"lint:headers": "node scripts/check-duplicate-headers.cjs . && node scripts/check-license-headers.mjs . --check",
|
|
"lint:headers:fix": "node scripts/check-duplicate-headers.cjs . && node scripts/check-license-headers.mjs . --fix",
|
|
"prepare": "husky",
|
|
"reinstall-app": "yarn install && (cd app && yarn clean:watchman && yarn clean:build && yarn clean:ios && yarn clean:xcode && yarn clean:pod-cache && yarn clean:android-deps && rm -rf app/node_modules) && yarn install && yarn workspace @selfxyz/mobile-app run install-app",
|
|
"sort-package-jsons": "find . -name 'package.json' -not -path './node_modules/*' -not -path './*/node_modules/*' | xargs npx sort-package-json",
|
|
"test": "yarn workspaces foreach --parallel -i --all run test",
|
|
"test:license-headers": "cd scripts/tests && node check-license-headers.test.mjs",
|
|
"types": "yarn workspaces foreach --topological-dev --parallel --exclude @selfxyz/contracts --exclude @selfxyz/common --exclude @selfxyz/mobile-app -i --all run types"
|
|
},
|
|
"resolutions": {
|
|
"@babel/core": "^7.28.4",
|
|
"@babel/runtime": "^7.28.4",
|
|
"@noble/curves": "1.9.7",
|
|
"@swc/core": "1.7.36",
|
|
"@tamagui/animations-react-native": "1.126.14",
|
|
"@tamagui/toast": "1.126.14",
|
|
"@types/node": "^22.18.3",
|
|
"@types/react": "^18.3.4",
|
|
"punycode": "npm:punycode.js@^2.3.1",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"react-native": "0.76.9",
|
|
"react-native-blur-effect": "1.1.3",
|
|
"react-native-passkey": "3.3.1",
|
|
"react-native-webview": "13.16.0"
|
|
},
|
|
"dependencies": {
|
|
"@babel/runtime": "^7.28.3",
|
|
"js-sha1": "^0.7.0",
|
|
"react": "^18.3.1",
|
|
"react-native": "0.76.9",
|
|
"uuid": "^13.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@react-native-community/cli-server-api": "^16.0.3",
|
|
"@types/node": "^22.18.3",
|
|
"gitleaks": "1.0.0",
|
|
"husky": "9.1.7",
|
|
"knip": "^5.63.1",
|
|
"patch-package": "^8.0.0",
|
|
"prettier": "^3.6.2",
|
|
"typescript": "^5.9.2"
|
|
},
|
|
"packageManager": "yarn@4.6.0",
|
|
"engines": {
|
|
"node": ">=22 <23"
|
|
}
|
|
}
|