Skip to content

feat: add local custom networks multisig#1435

Open
jaime-iobermudez wants to merge 10 commits intodevelopfrom
feat/add-local-custom-networks-multisig
Open

feat: add local custom networks multisig#1435
jaime-iobermudez wants to merge 10 commits intodevelopfrom
feat/add-local-custom-networks-multisig

Conversation

@jaime-iobermudez
Copy link
Contributor

Description:

This pull request introduces support for custom Hedera networks by allowing transactions to specify custom consensus nodes. It refactors the transaction schema, DTOs, and service logic to handle both standard and custom networks, and adds migration scripts and utility functions to facilitate this change. The most important changes are grouped below by theme.

Database and Migration Changes:

  • Added a migration (1742112000000-AddCustomNetworkSupport.ts) to convert the network column from enum to varchar, and to add a consensus_nodes column for custom network support. The migration handles both upgrade and downgrade scenarios safely.
  • Updated transaction.entity.ts to change the network field from an enum to a string and added a nullable consensus_nodes JSONB column.

Application Logic and DTO Updates:

  • Extended the Network enum to include CUSTOM, and updated transaction DTOs (create-transaction-request.dto.ts and get-transactions-response.dto.ts) to support consensus node specification for custom networks. [1] [2] [3] [4] [5] [6] [7] [8]
  • Updated transaction creation and retrieval logic in transaction.service.ts and autoSubmit.service.ts to use a new buildHederaClient utility, which selects the appropriate network and consensus nodes. [1] [2] [3] [4] [5]

Utility and Configuration Changes:

  • Added clientFactory.ts utility to build Hedera clients for both standard and custom networks based on provided consensus nodes.
  • Added new TypeORM migration scripts and commands to package.json for easier database management.
  • Updated database configuration in app.module.ts to use migrations instead of synchronize, and to automatically run migrations at startup.
  • Added example environment variables for multisig and custom consensus node configuration in .env.sample.

Related issue(s):

Fixes #

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: jaime-iobermudez <jaime.bermudez@io.builders>
Signed-off-by: jaime-iobermudez <jaime.bermudez@io.builders>
…tom-networks-multisig

Signed-off-by: jaime-iobermudez <jaime.bermudez@io.builders>
@jaime-iobermudez jaime-iobermudez self-assigned this Mar 18, 2026
@jaime-iobermudez jaime-iobermudez requested review from a team as code owners March 18, 2026 11:10
@swirlds-automation
Copy link

swirlds-automation commented Mar 18, 2026

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

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Signed-off-by: jaime-iobermudez <jaime.bermudez@io.builders>
Signed-off-by: jaime-iobermudez <jaime.bermudez@io.builders>
Signed-off-by: jaime-iobermudez <jaime.bermudez@io.builders>
Signed-off-by: jaime-iobermudez <jaime.bermudez@io.builders>
Signed-off-by: jaime-iobermudez <jaime.bermudez@io.builders>
Signed-off-by: jaime-iobermudez <jaime.bermudez@io.builders>
…tom-networks-multisig

Signed-off-by: jaime-iobermudez <jaime.bermudez@io.builders>
@sonarqubecloud
Copy link

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

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.

2 participants