Skip to content

Commit 77f4131

Browse files
committed
chain, graph: Remove old FromStr implementation to parse declared calls
We can't use FromStr any more since we need to pass the spec version and ABI to the parser. Also, adapt some of the old tests to the new parser and streamline them a little.
1 parent 1ebe1f9 commit 77f4131

3 files changed

Lines changed: 424 additions & 530 deletions

File tree

chain/ethereum/src/data_source.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,20 +1504,15 @@ impl UnresolvedMappingEventHandler {
15041504
}
15051505
}
15061506

1507-
#[derive(Clone, Debug, Hash, Eq, PartialEq, Deserialize)]
1507+
#[derive(Clone, Debug, Hash, Eq, PartialEq)]
15081508
pub struct MappingEventHandler {
15091509
pub event: String,
15101510
pub topic0: Option<H256>,
1511-
#[serde(deserialize_with = "deserialize_h256_vec", default)]
15121511
pub topic1: Option<Vec<H256>>,
1513-
#[serde(deserialize_with = "deserialize_h256_vec", default)]
15141512
pub topic2: Option<Vec<H256>>,
1515-
#[serde(deserialize_with = "deserialize_h256_vec", default)]
15161513
pub topic3: Option<Vec<H256>>,
15171514
pub handler: String,
1518-
#[serde(default)]
15191515
pub receipt: bool,
1520-
#[serde(default)]
15211516
pub calls: CallDecls,
15221517
}
15231518

0 commit comments

Comments
 (0)