[Bug] TransactionRequest conversions erase contract creation and can_build disagrees with build_unsigned
- 主要语言
- Rust
- 星标
- 1.3k
- 派生
- 668
- 平均合并
- 2 天 2 小时
- 30 天内合并 PR
- 29
描述
### Component
network, json-rpc, rpc
### What version of Alloy are you on?
Alloy v2.1.1 (bce5f50d63bb7d6d9a3b5b455a9a4508bf9dcdc4)
### Operating System
Windows
### Describe the bug
`TransactionRequest` conversions from concrete transaction types erase `TxKind::Create`.
For a valid legacy deployment, `TransactionRequest::from_transaction(deployment)` preserves `Some(TxKind::Create)` and rebuilds the original transaction. In contrast, both `TypedTransaction::Legacy(deployment).into()` and signed `TxEnvelope::Legacy(...).into()` produce `to == None`.
For each lossy request:
- `can_build() == true`;
- `complete_preferred() == Err(vec!["to"])`;
- `build_unsigned()` returns an error.
`Some(TxKind::Create)` is the public representation needed to distinguish deployments from incomplete requests with `to == None`: https://github.com/alloy-rs/alloy/pull/3704
Expected: concrete conversion paths preserve `Some(TxKind::Create)`; readiness and build APIs agree.
Actual: valid deployments become incomplete requests which report themselves buildable and then fail to build.
贡献指南
评估
这个 Issue 还没有评估数据。