Skip to content

Commit b3fdd80

Browse files
authored
rpc: derive arbitrary for TransactionRequest (#1113)
* rpc: derive arbitrary for TransactionRequest * fix deny
1 parent fa01c2a commit b3fdd80

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

crates/rpc-types-eth/src/transaction/request.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ use alloy_consensus::{
88
use alloy_primitives::{Address, Bytes, ChainId, TxKind, B256, U256};
99
use serde::{Deserialize, Serialize};
1010
use std::hash::Hash;
11+
1112
/// Represents _all_ transaction requests to/from RPC.
13+
#[cfg_attr(any(test, feature = "arbitrary"), derive(arbitrary::Arbitrary))]
1214
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]
1315
#[serde(rename_all = "camelCase")]
1416
#[doc(alias = "TxRequest")]
@@ -484,6 +486,7 @@ impl TransactionRequest {
484486
///
485487
/// If both fields are set, it is expected that they contain the same value, otherwise an error is
486488
/// returned.
489+
#[cfg_attr(any(test, feature = "arbitrary"), derive(arbitrary::Arbitrary))]
487490
#[derive(Clone, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]
488491
#[doc(alias = "TxInput")]
489492
pub struct TransactionInput {

deny.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ allow = [
1616
"Apache-2.0",
1717
"Apache-2.0 WITH LLVM-exception",
1818
"BSD-3-Clause",
19+
"BSD-2-Clause",
1920
"0BSD",
2021
"ISC",
2122
"Unicode-3.0",
@@ -32,6 +33,7 @@ exceptions = [
3233
# https://tldrlegal.com/license/creative-commons-cc0-1.0-universal
3334
{ allow = ["CC0-1.0"], name = "tiny-keccak" },
3435
{ allow = ["CC0-1.0"], name = "trezor-client" },
36+
{ allow = ["BSD-2-Clause"], name = "zerocopy" },
3537
]
3638

3739
[[licenses.clarify]]

0 commit comments

Comments
 (0)