feat(core): Add `as_*_mut` methods on `TypedTransaction` (#1310)
This commit is contained in:
parent
266b1f4777
commit
526f40e88f
|
@ -4,6 +4,8 @@
|
|||
|
||||
### Unreleased
|
||||
|
||||
- Add `as_*_mut` methods on `TypedTransaction`
|
||||
[#1310](https://github.com/gakonst/ethers-rs/pull/1310)
|
||||
- AWS EIP712 data signing no longer signs with EIP155
|
||||
- Added Cronos testnet to etherscan options [1276](https://github.com/gakonst/ethers-rs/pull/1276)
|
||||
- Fix parsing of a pending block
|
||||
|
|
|
@ -417,6 +417,25 @@ impl TypedTransaction {
|
|||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn as_legacy_mut(&mut self) -> Option<&mut TransactionRequest> {
|
||||
match self {
|
||||
Legacy(tx) => Some(tx),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
pub fn as_eip2930_mut(&mut self) -> Option<&mut Eip2930TransactionRequest> {
|
||||
match self {
|
||||
Eip2930(tx) => Some(tx),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
pub fn as_eip1559_mut(&mut self) -> Option<&mut Eip1559TransactionRequest> {
|
||||
match self {
|
||||
Eip1559(tx) => Some(tx),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl TypedTransaction {
|
||||
|
|
Loading…
Reference in New Issue