From 9e12d2174261b7ca47697158afb753e8626d3276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Duchesneau?= Date: Mon, 6 Nov 2023 15:51:45 -0500 Subject: [PATCH] fix multi-contract codegen, compile issues --- codegen/templates/ethereum/src/multiple_contracts_lib.rs.gotmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/templates/ethereum/src/multiple_contracts_lib.rs.gotmpl b/codegen/templates/ethereum/src/multiple_contracts_lib.rs.gotmpl index 32762885d..987b745f8 100644 --- a/codegen/templates/ethereum/src/multiple_contracts_lib.rs.gotmpl +++ b/codegen/templates/ethereum/src/multiple_contracts_lib.rs.gotmpl @@ -59,7 +59,7 @@ fn db_{{ $contract.GetName }}_out(events: &contract::Events, tables: &mut Databa {{- $rust := $event.Rust }} events.{{ $contract.GetName }}_{{ $rust.ProtoOutputModuleFieldName }}.iter().for_each(|evt| { tables - .create_row("{{ if eq $numberOfContracts 1 }}{{ $rust.TableChangeEntityName }}{{ else }}{{ $contract.GetName }}_{{ $rust.TableChangeEntityName }}{{ end }}", [("evt_tx_hash", evt.evt_tx_hash),("evt_index", evt.evt_index.to_string())]) + .create_row("{{ if eq $numberOfContracts 1 }}{{ $rust.TableChangeEntityName }}{{ else }}{{ $contract.GetName }}_{{ $rust.TableChangeEntityName }}{{ end }}", [("evt_tx_hash", evt.evt_tx_hash.to_string()),("evt_index", evt.evt_index.to_string())]) .set("evt_block_time", evt.evt_block_time.as_ref().unwrap()) .set("evt_block_number", evt.evt_block_number) {{- $numberOfAttributes := len $rust.ProtoFieldTableChangesMap }}{{ if eq $numberOfAttributes 0 }};{{ end }}