Strict deserialization
This commit is contained in:
parent
eec99ebad8
commit
24f72716b9
@ -19,6 +19,7 @@ use v1::types::{Bytes, H160, U256};
|
||||
|
||||
/// Call request
|
||||
#[derive(Debug, Default, PartialEq, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct CallRequest {
|
||||
/// From
|
||||
pub from: Option<H160>,
|
||||
|
@ -137,6 +137,7 @@ impl From<helpers::ConfirmationPayload> for ConfirmationPayload {
|
||||
|
||||
/// Possible modifications to the confirmed transaction sent by `Trusted Signer`
|
||||
#[derive(Debug, PartialEq, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct TransactionModification {
|
||||
/// Modified gas price
|
||||
#[serde(rename="gasPrice")]
|
||||
|
@ -21,6 +21,7 @@ use util::stats;
|
||||
|
||||
/// Values of RPC settings.
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct Histogram {
|
||||
/// Gas prices for bucket edges.
|
||||
#[serde(rename="bucketBounds")]
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
/// Values of RPC settings.
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct RpcSettings {
|
||||
/// Whether RPC is enabled.
|
||||
pub enabled: bool,
|
||||
@ -25,4 +26,4 @@ pub struct RpcSettings {
|
||||
pub interface: String,
|
||||
/// The port being listened on.
|
||||
pub port: u64,
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ use v1::types::{BlockNumber, H160};
|
||||
|
||||
/// Trace filter
|
||||
#[derive(Debug, PartialEq, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct TraceFilter {
|
||||
/// From block
|
||||
#[serde(rename="fromBlock")]
|
||||
|
@ -21,6 +21,7 @@ use v1::helpers;
|
||||
|
||||
/// Transaction request coming from RPC
|
||||
#[derive(Debug, Clone, Default, Eq, PartialEq, Hash, Serialize, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct TransactionRequest {
|
||||
/// Sender
|
||||
pub from: H160,
|
||||
|
Loading…
Reference in New Issue
Block a user