Skip to content

feat(provider): implement fullProtocolParameters support for transaction builds#310

Open
Mavis2103 wants to merge 2 commits intoIntersectMBO:mainfrom
Mavis2103:update/override-protocol-params
Open

feat(provider): implement fullProtocolParameters support for transaction builds#310
Mavis2103 wants to merge 2 commits intoIntersectMBO:mainfrom
Mavis2103:update/override-protocol-params

Conversation

@Mavis2103
Copy link
Copy Markdown
Contributor

@Mavis2103 Mavis2103 commented Apr 26, 2026

This pull request introduces a new fullProtocolParameters option to the transaction builder, allowing all protocol parameters to be overridden in a single place. It updates the builder internals and all relevant operations to use this new option for protocol parameter resolution, improving efficiency and flexibility—especially when a provider is not available. The changes also ensure all builder programs have access to build options via dependency injection.

Protocol parameters override and resolution:

  • Added a new fullProtocolParameters field to BuildOptions, deprecating the old protocolParameters for fee calculation and enabling full protocol parameter overrides for all builder operations.
  • Updated the protocol parameter resolution logic in resolveProtocolParameters to prioritize fullProtocolParameters if present, falling back to provider or legacy options as needed.
  • Refactored all staking, pool, governance, and proposal operations to use the new fullProtocolParameters for deposit and fee calculations, removing direct provider dependency where possible. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

Dependency injection and type improvements:

  • Ensured all builder programs (stake, pool, governance, proposal) now include BuildOptionsTag in their effect environment, so build options are always available.
  • Updated effect signatures and imports across builder modules to include BuildOptionsTag. [1] [2] [3] [4]

Internal refactoring and minor cleanup:

  • Simplified and clarified the makeTxBuilder overloads for better readability.
  • Minor formatting and code style adjustments in txBuilder.ts and related files. [1] [2]

These changes make protocol parameter management more robust and flexible, reduce unnecessary provider calls, and streamline transaction building for advanced use cases.

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.

1 participant