Skip to content

Commit b053022

Browse files
committed
graph: Rename BlockHandler input -> blockFormat
1 parent 1a31f83 commit b053022

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

graph/src/components/ethereum/adapter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ impl EthereumBlockFilter {
438438
.mapping
439439
.block_handlers
440440
.iter()
441-
.map(|handler| handler.input)
441+
.map(|handler| handler.block_format)
442442
.max()
443443
.unwrap_or(EthereumBlockHandlerData::Block)
444444
.into();

graph/src/data/subgraph/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ impl UnresolvedMappingABI {
515515
pub struct MappingBlockHandler {
516516
pub handler: String,
517517
pub filter: Option<BlockHandlerFilter>,
518-
pub input: EthereumBlockHandlerData,
518+
pub block_format: EthereumBlockHandlerData,
519519
}
520520

521521
#[derive(Clone, Debug, Hash, Eq, PartialEq, Deserialize)]
@@ -531,7 +531,7 @@ impl From<EthereumBlockHandlerEntity> for MappingBlockHandler {
531531
Self {
532532
handler: entity.handler,
533533
filter: None,
534-
input: entity.input,
534+
block_format: entity.block_format,
535535
}
536536
}
537537
}

graph/src/data/subgraph/schema.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ impl TryFromValue for EthereumContractAbiEntity {
10091009
pub struct EthereumBlockHandlerEntity {
10101010
pub handler: String,
10111011
pub filter: Option<EthereumBlockHandlerFilterEntity>,
1012-
pub input: EthereumBlockHandlerData,
1012+
pub block_format: EthereumBlockHandlerData,
10131013
}
10141014

10151015
impl WriteOperations for EthereumBlockHandlerEntity {
@@ -1026,7 +1026,7 @@ impl WriteOperations for EthereumBlockHandlerEntity {
10261026
if let Some(filter_id) = filter_id {
10271027
entity.set("filter", filter_id);
10281028
}
1029-
entity.set("input", self.input);
1029+
entity.set("input", self.block_format);
10301030
ops.add(Self::TYPENAME, id.to_owned(), entity);
10311031
}
10321032
}
@@ -1050,7 +1050,7 @@ impl From<super::MappingBlockHandler> for EthereumBlockHandlerEntity {
10501050
EthereumBlockHandlerEntity {
10511051
handler: block_handler.handler,
10521052
filter,
1053-
input: EthereumBlockHandlerData::from(block_handler.input),
1053+
block_format: EthereumBlockHandlerData::from(block_handler.block_format),
10541054
}
10551055
}
10561056
}
@@ -1068,7 +1068,7 @@ impl TryFromValue for EthereumBlockHandlerEntity {
10681068
Ok(EthereumBlockHandlerEntity {
10691069
handler: map.get_required("handler")?,
10701070
filter: map.get_optional("filter")?,
1071-
input: map.get_optional("input")?.unwrap_or_default(),
1071+
block_format: map.get_optional("blockFormat")?.unwrap_or_default(),
10721072
})
10731073
}
10741074
}

0 commit comments

Comments
 (0)