Pull Request: TypeScript migration for scripts, improved Hardhat config, and Makefile updates - #1
Merged
Merged
Conversation
Complete TypeScript migration of all deployment and utility scripts: Migrated Scripts (9 files): - scripts/abi/saveAbi.mjs → saveAbi.ts - scripts/abi/cleanAbis.mjs → cleanAbis.ts - scripts/deployment/deploy.ts (restructured from scripts/deploy.ts) - scripts/deployment/deploy-smart-contracts.ts (from deploy-smart-contracts.mjs) - scripts/deployment/deploy-chat-utility.ts (from deploy-chat-utility.mjs) - scripts/logs/console/console_logger.ts (from console_logger.mjs) - scripts/logs/data/data_logger.ts (from data_logger.mjs) - scripts/roles/assignRoles.ts (from assignRoles.mjs) Script Improvements: - Full type safety with proper TypeScript annotations - Network config integration using typed interfaces - Proper error handling with typed catch blocks - Non-null assertions where appropriate - Fixed constructor calls to match actual contract signatures - Direct constructor args instead of spread operators Console Logger Enhancements: - Remove unnecessary printNewLine() function - Add newlines directly in output functions - Create printDeploymentSummary() for unified deployment output - Cleaner, more maintainable logging Deployment Script Enhancements: - Remove hardcoded explorer URL mappings - Read explorer URLs directly from network config - Use configuration constants (TIMELOCK_DELAY, etc.) - Single function call for deployment summary - Proper network type handling with (network as any).name
Hardhat Configuration Improvements: - Add name property to all network configurations - Ensure all networks have proper url (RPC endpoint) definitions - Add explorer property with name and URL to all networks - Add Ethereum Mainnet configuration - Update type definitions in hardhat.d.ts for new network properties
…ment/ structure Makefile Updates: - Update all script references from .mjs to .ts - Update deployment commands to use new scripts/deployment/ structure - Reference new TypeScript entry points - Maintain backwards compatibility with existing make targets
Documentation & Tooling: - Add GNOSIS_SAFE_DEPLOYMENT_RUNBOOK.md with deployment procedures - Add LC-174-IMPLEMENTATION-SUMMARY.md documenting all changes - Add example-proposal.json with sample proposal format - Add README.md for Gnosis Safe scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: TypeScript migration for scripts, improved Hardhat config, and Makefile updates
Summary
This pull request migrates all deployment and utility scripts from
.mjsto.ts, introduces typed network configuration, improves logging and deployment summaries, and updates Hardhat and Makefile to align with the new structure. The goal is safer builds, clearer outputs, and a single source of truth for network and explorer metadata.Scope
What changed
Script migration to TypeScript
Migrated 9 scripts with type annotations, error handling, and constructor fixes:
scripts/abi/saveAbi.mjsscripts/abi/saveAbi.tsscripts/abi/cleanAbis.mjsscripts/abi/cleanAbis.tsscripts/deploy.tsscripts/deployment/deploy.ts(restructured)scripts/deploy-smart-contracts.mjsscripts/deployment/deploy-smart-contracts.tsscripts/deploy-chat-utility.mjsscripts/deployment/deploy-chat-utility.tsscripts/logs/console/console_logger.mjsscripts/logs/console/console_logger.tsscripts/logs/data/data_logger.mjsscripts/logs/data/data_logger.tsscripts/roles/assignRoles.mjsscripts/roles/assignRoles.tsKey improvements
Console logger
printNewLine()helper and wrote newlines directly in output functionsprintDeploymentSummary()to produce a single, consistent summary across scriptsDeployment scripts
TIMELOCK_DELAYprintDeploymentSummary()to standardize output(network as any).namewhere Hardhat types are looseHardhat configuration
nameto all configured networksurlRPC endpointexplorerfield withnameandurlfor each networkhardhat.d.tsto type new network propertiesMakefile
.mjsto.tsscripts/deployment/structureDeveloper experience