|
| 1 | +--- |
| 2 | +'@hashgraph/asset-tokenization-contracts': minor |
| 3 | +--- |
| 4 | + |
| 5 | +Refactor deployment scripts into modular infrastructure/domain architecture with framework-agnostic provider pattern and automated registry generation. |
| 6 | + |
| 7 | +**Breaking Changes:** |
| 8 | + |
| 9 | +- Deployment scripts API changed: operations now require `DeploymentProvider` parameter |
| 10 | +- Import paths changed to `@scripts/infrastructure` and `@scripts/domain` aliases |
| 11 | +- Removed legacy command/query/result patterns and monolithic scripts |
| 12 | +- Scripts reorganized: infrastructure/ (generic, reusable) and domain/ (ATS-specific) |
| 13 | +- Some function signatures changed for consistency with provider pattern |
| 14 | + |
| 15 | +**Architecture:** |
| 16 | + |
| 17 | +- **Infrastructure/Domain Separation**: Strict separation between generic operations (infrastructure/) and ATS-specific business logic (domain/) |
| 18 | +- **DeploymentProvider Interface**: Framework-agnostic deployment abstraction enabling scripts to work with Hardhat OR standalone Node.js |
| 19 | +- **Provider Implementations**: HardhatProvider (uses Hardhat ethers) and StandaloneProvider (pure ethers.js) |
| 20 | +- **Modular Operations**: Atomic deployment operations (deployBlr, deployFacets, createBatchConfiguration, deployProxy, upgradeProxy) |
| 21 | +- **Workflow Compositions**: High-level orchestration (deployCompleteSystem, deployWithExistingBlr) |
| 22 | + |
| 23 | +**Registry System Enhancements:** |
| 24 | + |
| 25 | +- **Automated Generation**: Registry regenerates automatically after compilation (integrated into Hardhat build) |
| 26 | +- **Event/Error Deduplication**: Filters out StorageWrapper base classes during inheritance (AccessControlFacet: 51→4 events, 88% reduction) |
| 27 | +- **Expanded Metadata**: 49 facets | 2 infrastructure contracts | 29 storage wrappers | 28 unique roles |
| 28 | +- **Rich Metadata**: Full inheritance chains, method signatures with selectors, events with topic0, custom errors |
| 29 | +- **Minimal Output Mode**: Uses LogLevel system for quiet compilation output |
| 30 | +- **Zero Warnings**: TimeTravelFacet correctly excluded from resolver key and variant checks |
| 31 | + |
| 32 | +**External Facet Extensibility:** |
| 33 | + |
| 34 | +- Enable downstream projects (e.g., Green Bonds Platform) to deploy custom facets alongside ATS facets |
| 35 | +- `deployFacets()` and `createBatchConfiguration()` accept facets not in ATS registry |
| 36 | +- `RegistryProvider` interface for dependency injection pattern |
| 37 | +- Registry generation tools exported for downstream use |
| 38 | + |
| 39 | +**Code Quality:** |
| 40 | + |
| 41 | +- **Deduplication**: 90% code duplication eliminated between equity/bond modules (240 lines removed) |
| 42 | +- **Magic Numbers**: Eliminated across 175 test files, replaced with named constants |
| 43 | +- **Type Safety**: Fixed 748 TypeScript errors with proper Hardhat plugin type references |
| 44 | +- **Test Modernization**: All test fixtures updated to use new modular deployment approach |
| 45 | + |
| 46 | +**Facet Standardization:** |
| 47 | + |
| 48 | +- All facets follow `*Facet.sol` naming convention |
| 49 | +- TimeTravel variants follow `*FacetTimeTravel.sol` pattern |
| 50 | +- ERC20Votes split into library (ERC20Votes.sol) + facet (ERC20VotesFacet.sol) |
| 51 | + |
| 52 | +**Performance:** |
| 53 | + |
| 54 | +- Full build: 43.5s → 45.3s (+1.8s, 4% overhead for registry) |
| 55 | +- Registry generation: ~1.5s standalone |
| 56 | +- Net code reduction: 2,947 lines (29,203 insertions, 32,150 deletions across 175 files) |
0 commit comments