Skip to content

Conversation

@MiguelLZPF
Copy link
Contributor

@MiguelLZPF MiguelLZPF commented Sep 12, 2025

Description

This pull request upgrades Solidity compiler configuration and standardizes license headers across the entire smart contract codebase. The changes improve compatibility, reduce bundle size, and ensure consistent licensing practices.

Solidity Version Upgrade:

  • Upgraded all 315+ contracts from fixed pragma solidity 0.8.18; to flexible pragma solidity >=0.8.0 <0.9.0;
  • Updated Hardhat configuration to use Solidity 0.8.28 with 'cancun' EVM version
  • Enhanced compiler compatibility while maintaining backward compatibility with existing deployments

License Header Standardization:

  • Removed large Apache License 2.0 headers from 332 Solidity files (significant bundle size reduction)
  • Standardized all files to use SPDX-License-Identifier: Apache-2.0 as first line
  • Follows Solidity style guide recommendations for license identification

Development Dependencies:

  • Upgraded Hardhat from v2.22.19 to v2.26.3
  • Updated TypeChain dependencies for better type generation
  • Improved build configuration and removed unused dependencies

Impact:

  • Compatibility: Enables use of newer Solidity versions and tooling
  • File Size: Significant reduction in contract file sizes
  • Standards: Proper SPDX license identification across all contracts
  • Maintenance: Better tooling support and dependency management

All changes maintain full backward compatibility with existing deployed contracts.

Type of change

  • Bug fix 🐞
  • New feature ✨
  • Breaking change 💥
  • Documentation update 📖
  • Refactor 🔧

Testing

Verification completed:

  • ✅ All 423 Solidity files compile successfully
  • ✅ 1106 TypeScript typings generated without errors
  • ✅ Solidity linting passes with no warnings
  • ✅ Code formatting verified across all files

Node version:

  • 20
  • 22
  • 24

Checklist

  • Style Guidelines followed ✅
  • Documentation Updated 📚
  • Linters - No New Warnings ⚠️
  • Local Tests Pass ✅
  • Effective Tests Added ✔️
  • No reduction of Coverage

@MiguelLZPF MiguelLZPF self-assigned this Sep 12, 2025
@MiguelLZPF MiguelLZPF added the Contracts Changes related to the “contracts” module label Sep 12, 2025
@hedera-eng-infrastructure
Copy link

hedera-eng-infrastructure commented Sep 12, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@MiguelLZPF MiguelLZPF force-pushed the feat/BBND-1057-latest-solidity-version-remove-license-header branch 2 times, most recently from c9adecd to 363e817 Compare September 12, 2025 08:54
@MiguelLZPF MiguelLZPF marked this pull request as ready for review September 12, 2025 09:44
@MiguelLZPF MiguelLZPF requested review from a team as code owners September 12, 2025 09:44
@MiguelLZPF MiguelLZPF force-pushed the feat/BBND-1057-latest-solidity-version-remove-license-header branch from 363e817 to 502d554 Compare September 12, 2025 10:51
@MiguelLZPF MiguelLZPF added the Improvement Code changes driven by non business requirements label Sep 12, 2025
@MiguelLZPF MiguelLZPF force-pushed the feat/BBND-1057-latest-solidity-version-remove-license-header branch 2 times, most recently from 1562899 to 7a10895 Compare September 16, 2025 07:00
Upgrade all Solidity contracts from fixed version pragma solidity 0.8.18;
to flexible version range pragma solidity >=0.8.0 <0.9.0;

This enables compatibility with newer Solidity versions while maintaining
compatibility with existing 0.8.18 compiled contracts.

Updated 315+ contract files across all layers:
- Layer 0: Core storage wrappers and libraries
- Layer 1: Business logic implementations
- Layer 2: Asset-specific functionality
- Layer 3: Jurisdiction-specific implementations
- Factory and resolver contracts
- Mock contracts for testing
- Test utilities and time travel contracts

Also updated .solhint.json compiler-version rule to accept the new
flexible version range.

Signed-off-by: Miguel_LZPF <[email protected]>
Update Hardhat configuration and dependencies:
- Upgrade primary compiler from 0.8.18 to 0.8.28
- Update EVM version from 'london' to 'cancun'
- Update hardhat network hardfork to 'cancun'
- Remove redundant global compiler settings
- Clean up dependency compiler paths

Update development dependencies:
- Upgrade @typechain/ethers-v5 from ^10.1.0 to ^11.1.2
- Upgrade hardhat from ^2.22.19 to ^v2.26.3
- Add TypeChain override for consistent version resolution
- Remove unused blob dependency
- Keep publishConfig for proper scoped package publishing

Signed-off-by: Miguel_LZPF <[email protected]>
Remove large Apache License 2.0 headers from all Solidity files and replace
with proper SPDX identifiers for consistency with industry standards and
reduced file size.

Changes:
- Updated 315 Solidity files to use SPDX-License-Identifier: Apache-2.0
- Removed verbose Apache license text blocks
- Fixed TypeScript import for IIdFactory__factory in tasks/deploy.ts
- Maintained license compliance while improving code readability

Signed-off-by: Miguel_LZPF <[email protected]>
@MiguelLZPF MiguelLZPF force-pushed the feat/BBND-1057-latest-solidity-version-remove-license-header branch from 7a10895 to 21d0193 Compare September 17, 2025 06:44
- Change pragma from exact version 0.8.18 to range >=0.8.0 <0.9.0
- Remove full Apache license headers, keeping only SPDX identifiers
- Standardize license to Apache-2.0 for consistency
- Fix SPDX license header ordering (license first, then pragma)
- Resolves build failures after develop rebase

Files updated:
- IBeneficiaries.sol
- BeneficiariesStorageWrapper.sol
- Beneficiaries.sol
- BeneficiariesFacet.sol
- BeneficiariesFacetTimeTravel.sol

All builds and tests pass successfully.

Signed-off-by: Miguel_LZPF <[email protected]>
@MiguelLZPF MiguelLZPF merged commit 284118a into develop Sep 18, 2025
10 checks passed
@MiguelLZPF MiguelLZPF deleted the feat/BBND-1057-latest-solidity-version-remove-license-header branch September 18, 2025 08:26
themariofrancia pushed a commit that referenced this pull request Sep 25, 2025
themariofrancia pushed a commit that referenced this pull request Dec 9, 2025
themariofrancia pushed a commit that referenced this pull request Dec 10, 2025
themariofrancia pushed a commit that referenced this pull request Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contracts Changes related to the “contracts” module Improvement Code changes driven by non business requirements Refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants