Skip to content

Add registry update script#87

Closed
Fbartoli wants to merge 9 commits intosafe-global:feat/registry-update-scriptfrom
Fbartoli:main
Closed

Add registry update script#87
Fbartoli wants to merge 9 commits intosafe-global:feat/registry-update-scriptfrom
Fbartoli:main

Conversation

@Fbartoli
Copy link
Copy Markdown
Contributor

@Fbartoli Fbartoli commented Dec 4, 2025

No description provided.

Fbartoli and others added 7 commits November 5, 2025 11:52
…nfig.json

- Introduced a new script `update-registry.ts` for updating module registry JSON files.
- Added a GitHub Actions workflow `update-registry.yml` to automate registry updates.
- Updated `package.json` to include a new script command for registry updates and added `tsx` as a dependency.
- Modified `tsconfig.json` to include the new script directory in the TypeScript compilation.
@Fbartoli Fbartoli requested a review from a team as a code owner December 4, 2025 08:54
@Fbartoli Fbartoli requested review from akshay-ap, nlordell, remedcu and rmeissner and removed request for a team December 4, 2025 08:54
- Added `tsx` as a dependency in `pnpm-lock.yaml`.
- Updated `pnpm-lock.yaml` to include new esbuild packages for various platforms and architectures.
- Refactored `update-registry.ts` for consistent single quotes and improved error messages.
- Enhanced argument parsing and validation in `update-registry.ts` for better user feedback.
@dasanra dasanra requested review from a team and removed request for akshay-ap, nlordell, remedcu and rmeissner January 20, 2026 14:49
Comment on lines +19 to +40
const MODULE_CONFIG: Record<
string,
{
dir: string;
contractName: string;
jsonFile: string;
supportedVersions: string[];
}
> = {
allowance: {
dir: 'allowance-module',
contractName: 'AllowanceModule',
jsonFile: 'allowance-module.json',
supportedVersions: ['0.1.1'],
},
'social-recovery': {
dir: 'safe-recovery-module',
contractName: 'SocialRecoveryModule',
jsonFile: 'social-recovery-module.json',
supportedVersions: ['0.1.0'],
},
};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This script only works with 2 modules and the hardcoded versions in the config, Is this intended?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For now we want to enable only these two specific modules to be deployed via the automated scripts.

@yagopv
Copy link
Copy Markdown
Member

yagopv commented Jan 21, 2026

Is it worth to verify the address using for example Etherscan to check if the contract is deployed and that is the correct one?

const data: ModuleDeployment = JSON.parse(content);

// Normalize address to checksum format (lowercase for consistency with existing entries)
const normalizedAddress = address;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The address is not being normalized right? besides the comment above

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Completely and the comment is not really accurate, I was checking and assets hold checksummed addresses

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Solved in #95

@dasanra dasanra changed the base branch from main to feat/registry-update-script January 21, 2026 15:33
@dasanra dasanra self-requested a review January 21, 2026 16:39
@dasanra
Copy link
Copy Markdown
Collaborator

dasanra commented Jan 21, 2026

This PR will be finalized in #95

@dasanra dasanra closed this Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants