etherscan: fix deserializing contract creation NormalTransaction objects (#2029)

* etherscan: fix deserializing contract creation NormalTransaction objects

* Improve tests
This commit is contained in:
Peter Davies 2023-01-09 05:12:33 +00:00 committed by GitHub
parent bab3e97d3b
commit 801a638a89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -186,6 +186,7 @@ pub struct NormalTransaction {
pub transaction_index: Option<u64>,
#[serde(with = "genesis_string")]
pub from: GenesisOption<Address>,
#[serde(with = "json_string")]
pub to: Option<Address>,
#[serde(deserialize_with = "deserialize_stringified_numeric")]
pub value: U256,
@ -797,7 +798,7 @@ mod tests {
let txs = client
.get_transactions(
&"0x58eB28A67731c570Ef827C365c89B5751F9E6b0a".parse().unwrap(),
&"0x4F26FfBe5F04ED43630fdC30A87638d53D0b0876".parse().unwrap(),
None,
)
.await;