Skip to content

docs: add examples for TransactionRequest::minimal_tx_type() #2566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2025

Conversation

mattsse
Copy link
Member

@mattsse mattsse commented Jun 9, 2025

Summary

  • Add comprehensive documentation examples for the minimal_tx_type() function in TransactionRequest
  • Demonstrate transaction type determination rules with builder API usage patterns

Changes

  • Added detailed examples showing priority order: EIP-7702 → EIP-4844 → EIP-1559 → EIP-2930 → Legacy
  • Included examples using builder methods like .max_fee_per_gas(), .access_list(), etc.
  • Demonstrated how higher-priority transaction types override lower-priority ones
  • Covered all supported transaction type detection scenarios

The examples help developers understand how the function determines the minimal transaction type based on which fields are set in the request.

🤖 Generated with Claude Code

Add comprehensive documentation examples demonstrating the transaction type
determination rules in the minimal_tx_type() function. Examples show:

- Priority order of transaction types (EIP-7702, EIP-4844, EIP-1559, EIP-2930, Legacy)
- Builder API usage patterns for setting transaction fields
- How higher-priority fields override lower-priority ones
- All supported transaction type detection scenarios

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@mattsse mattsse merged commit 024c182 into main Jun 10, 2025
27 checks passed
@mattsse mattsse deleted the docs/transaction-request-minimal-tx-type-examples branch June 10, 2025 11:27
@github-project-automation github-project-automation bot moved this to Done in Alloy Jun 10, 2025
jgomez360 pushed a commit to jgomez360/alloy that referenced this pull request Jun 15, 2025
…s#2566)

Add comprehensive documentation examples demonstrating the transaction type
determination rules in the minimal_tx_type() function. Examples show:

- Priority order of transaction types (EIP-7702, EIP-4844, EIP-1559, EIP-2930, Legacy)
- Builder API usage patterns for setting transaction fields
- How higher-priority fields override lower-priority ones
- All supported transaction type detection scenarios

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant