Skip to content

feat: enable contract_custom builder for ledger 7#864

Merged
ozgb merged 7 commits into
mainfrom
ozgb-add-custom-contract-ledger-7
Mar 11, 2026
Merged

feat: enable contract_custom builder for ledger 7#864
ozgb merged 7 commits into
mainfrom
ozgb-add-custom-contract-ledger-7

Conversation

@ozgb

@ozgb ozgb commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Overview

The contract_custom transaction builder now works on chains still at ledger 7, removing the previous "not supported for ledger 7" error.

Ticket: https://shielded.atlassian.net/browse/PM-22229

🗹 TODO before merging

  • Ready

📌 Submission Checklist

  • Changes are backward-compatible (or flagged if breaking)
  • Pull request description explains why the change is needed
  • Self-reviewed the diff
  • I have included a change file, or skipped for this reason:
  • If the changes introduce a new feature, I have bumped the node minor version
  • Update documentation (if relevant)
  • Updated AGENTS.md if build commands, architecture, or workflows changed
  • No new todos introduced

🧪 Testing Evidence

Please describe any additional testing aside from CI:

  • Additional tests are provided (if possible)

🔱 Fork Strategy

  • Node Runtime Update
  • Node Client Update
  • Other:
  • N/A

Links

Move version-specific types (EncodedOutputInfo, EncodedInputInfo,
EncodedTransientInfo) and their trait impls from encoded_zswap_local_state.rs
into the version-parameterized contract_custom.rs module. This allows
them to use version-local types (BuildOutput, BuildInput, etc.) and
work correctly for both ledger 7 and ledger 8.

- Add conversion helpers that bridge between ledger_8 encoded types
  and version-local ledger types (CoinInfo, Recipient, etc.)
- Widen field visibility to pub(crate) for cross-module access
- Convert UtxoId and WalletAddress via string representation in the
  constructor to handle cross-version type differences
@ozgb ozgb requested a review from a team as a code owner March 5, 2026 13:26
@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

kics-logo

KICS version: v2.1.19

Category Results
CRITICAL CRITICAL 0
HIGH HIGH 0
MEDIUM MEDIUM 44
LOW LOW 3
INFO INFO 59
TRACE TRACE 0
TOTAL TOTAL 106
Metric Values
Files scanned placeholder 26
Files parsed placeholder 26
Files failed to scan placeholder 0
Total executed queries placeholder 73
Queries failed to execute placeholder 0
Execution time placeholder 11

ozgb added 3 commits March 11, 2026 11:56
Use version-local ContractEffects type instead of direct
midnight_node_ledger_helpers imports to avoid duplicate definitions
and version mismatches.
Comment thread util/toolkit/src/tx_generator/builder/builders/common/contract_custom.rs Outdated
@ozgb ozgb enabled auto-merge March 11, 2026 17:11
@ozgb ozgb added this pull request to the merge queue Mar 11, 2026
Merged via the queue into main with commit 658603f Mar 11, 2026
34 checks passed
@ozgb ozgb deleted the ozgb-add-custom-contract-ledger-7 branch March 11, 2026 19:57
gilescope pushed a commit that referenced this pull request Apr 8, 2026
@gilescope gilescope added this to the node-1.0.0 milestone Apr 10, 2026
m2ux added a commit that referenced this pull request Apr 23, 2026
Signed-off-by: Mike Clay <mike.clay@shielded.io>
m2ux added a commit that referenced this pull request Apr 23, 2026
Signed-off-by: Mike Clay <mike.clay@shielded.io>
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.

4 participants