diff --git a/graph/src/components/ethereum/adapter.rs b/graph/src/components/ethereum/adapter.rs index ceaa4ede9ab..aa1a409ef44 100644 --- a/graph/src/components/ethereum/adapter.rs +++ b/graph/src/components/ethereum/adapter.rs @@ -438,7 +438,7 @@ impl EthereumBlockFilter { .mapping .block_handlers .iter() - .map(|handler| handler.input) + .map(|handler| handler.block_format) .max() .unwrap_or(EthereumBlockHandlerData::Block) .into(); diff --git a/graph/src/data/subgraph/mod.rs b/graph/src/data/subgraph/mod.rs index 59c1032622b..2a70f2eef3a 100644 --- a/graph/src/data/subgraph/mod.rs +++ b/graph/src/data/subgraph/mod.rs @@ -515,7 +515,7 @@ impl UnresolvedMappingABI { pub struct MappingBlockHandler { pub handler: String, pub filter: Option, - pub input: EthereumBlockHandlerData, + pub block_format: EthereumBlockHandlerData, } #[derive(Clone, Debug, Hash, Eq, PartialEq, Deserialize)] @@ -531,7 +531,7 @@ impl From for MappingBlockHandler { Self { handler: entity.handler, filter: None, - input: entity.input, + block_format: entity.block_format, } } } diff --git a/graph/src/data/subgraph/schema.rs b/graph/src/data/subgraph/schema.rs index cdfde345d33..1ff4627263b 100644 --- a/graph/src/data/subgraph/schema.rs +++ b/graph/src/data/subgraph/schema.rs @@ -1009,7 +1009,7 @@ impl TryFromValue for EthereumContractAbiEntity { pub struct EthereumBlockHandlerEntity { pub handler: String, pub filter: Option, - pub input: EthereumBlockHandlerData, + pub block_format: EthereumBlockHandlerData, } impl WriteOperations for EthereumBlockHandlerEntity { @@ -1026,7 +1026,7 @@ impl WriteOperations for EthereumBlockHandlerEntity { if let Some(filter_id) = filter_id { entity.set("filter", filter_id); } - entity.set("input", self.input); + entity.set("input", self.block_format); ops.add(Self::TYPENAME, id.to_owned(), entity); } } @@ -1050,7 +1050,7 @@ impl From for EthereumBlockHandlerEntity { EthereumBlockHandlerEntity { handler: block_handler.handler, filter, - input: EthereumBlockHandlerData::from(block_handler.input), + block_format: EthereumBlockHandlerData::from(block_handler.block_format), } } } @@ -1068,7 +1068,7 @@ impl TryFromValue for EthereumBlockHandlerEntity { Ok(EthereumBlockHandlerEntity { handler: map.get_required("handler")?, filter: map.get_optional("filter")?, - input: map.get_optional("input")?.unwrap_or_default(), + block_format: map.get_optional("blockFormat")?.unwrap_or_default(), }) } }