Skip to content

Commit

Permalink
Handle events inside transfer_ticket internals
Browse files Browse the repository at this point in the history
  • Loading branch information
Groxan committed Feb 23, 2024
1 parent c0d71f8 commit fd171da
Show file tree
Hide file tree
Showing 18 changed files with 42 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Tzkt.Sync/Protocols/Handlers/Proto1/Proto1Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public override async Task Commit(JsonElement block)
bigMapCommit.Append(internalTx.Transaction, internalTx.Transaction.Target as Contract, internalTx.BigMapDiffs);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Sync/Protocols/Handlers/Proto10/Proto10Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public override async Task Commit(JsonElement block)
bigMapCommit.Append(internalTx.Transaction, internalTx.Transaction.Target as Contract, internalTx.BigMapDiffs);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Sync/Protocols/Handlers/Proto11/Proto11Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public override async Task Commit(JsonElement block)
bigMapCommit.Append(internalTx.Transaction, internalTx.Transaction.Target as Contract, internalTx.BigMapDiffs);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Sync/Protocols/Handlers/Proto12/Proto12Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public override async Task Commit(JsonElement block)
bigMapCommit.Append(internalTx.Transaction, internalTx.Transaction.Target as Contract, internalTx.BigMapDiffs);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions Tzkt.Sync/Protocols/Handlers/Proto13/Proto13Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public override async Task Commit(JsonElement block)
bigMapCommit.Append(internalTx.Transaction, internalTx.Transaction.Target as Contract, internalTx.BigMapDiffs);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down Expand Up @@ -223,7 +223,7 @@ public override async Task Commit(JsonElement block)
bigMapCommit.Append(internalTx.Transaction, internalTx.Transaction.Target as Contract, internalTx.BigMapDiffs);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' inside 'transfer_ticket' is not expected");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' inside 'transfer_ticket' is not expected");
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions Tzkt.Sync/Protocols/Handlers/Proto14/Proto14Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public override async Task Commit(JsonElement block)
await new ContractEventCommit(this).Apply(blockCommit.Block, internalContent);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down Expand Up @@ -231,8 +231,11 @@ public override async Task Commit(JsonElement block)
if (internalTx.BigMapDiffs != null)
bigMapCommit.Append(internalTx.Transaction, internalTx.Transaction.Target as Contract, internalTx.BigMapDiffs);
break;
case "event":
await new ContractEventCommit(this).Apply(blockCommit.Block, internalContent);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' inside 'transfer_ticket' is not expected");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' inside 'transfer_ticket' is not expected");
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions Tzkt.Sync/Protocols/Handlers/Proto15/Proto15Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public override async Task Commit(JsonElement block)
await new ContractEventCommit(this).Apply(blockCommit.Block, internalContent);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down Expand Up @@ -241,8 +241,11 @@ public override async Task Commit(JsonElement block)
if (internalTx.BigMapDiffs != null)
bigMapCommit.Append(internalTx.Transaction, internalTx.Transaction.Target as Contract, internalTx.BigMapDiffs);
break;
case "event":
await new ContractEventCommit(this).Apply(blockCommit.Block, internalContent);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' inside 'transfer_ticket' is not expected");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' inside 'transfer_ticket' is not expected");
}
}
}
Expand Down
9 changes: 6 additions & 3 deletions Tzkt.Sync/Protocols/Handlers/Proto16/Proto16Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public override async Task Commit(JsonElement block)
await new ContractEventCommit(this).Apply(blockCommit.Block, internalContent);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down Expand Up @@ -250,8 +250,11 @@ public override async Task Commit(JsonElement block)
if (internalTx.TicketUpdates != null)
ticketsCommit.Append(parent1.Operation, internalTx.Transaction, internalTx.TicketUpdates);
break;
case "event":
await new ContractEventCommit(this).Apply(blockCommit.Block, internalContent);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' inside 'transfer_ticket' is not expected");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' inside 'transfer_ticket' is not expected");
}
}
}
Expand Down Expand Up @@ -294,7 +297,7 @@ public override async Task Commit(JsonElement block)
await new ContractEventCommit(this).Apply(blockCommit.Block, internalContent);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down
9 changes: 6 additions & 3 deletions Tzkt.Sync/Protocols/Handlers/Proto17/Proto17Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public override async Task Commit(JsonElement block)
await new ContractEventCommit(this).Apply(blockCommit.Block, internalContent);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down Expand Up @@ -250,8 +250,11 @@ public override async Task Commit(JsonElement block)
if (internalTx.TicketUpdates != null)
ticketsCommit.Append(parent1.Operation, internalTx.Transaction, internalTx.TicketUpdates);
break;
case "event":
await new ContractEventCommit(this).Apply(blockCommit.Block, internalContent);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' inside 'transfer_ticket' is not expected");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' inside 'transfer_ticket' is not expected");
}
}
}
Expand Down Expand Up @@ -294,7 +297,7 @@ public override async Task Commit(JsonElement block)
await new ContractEventCommit(this).Apply(blockCommit.Block, internalContent);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down
9 changes: 6 additions & 3 deletions Tzkt.Sync/Protocols/Handlers/Proto18/Proto18Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public override async Task Commit(JsonElement block)
await new ContractEventCommit(this).Apply(blockCommit.Block, internalContent);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand All @@ -239,8 +239,11 @@ public override async Task Commit(JsonElement block)
if (internalTx.TicketUpdates != null)
ticketsCommit.Append(parent1.Operation, internalTx.Transaction, internalTx.TicketUpdates);
break;
case "event":
await new ContractEventCommit(this).Apply(blockCommit.Block, internalContent);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' inside 'transfer_ticket' is not expected");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' inside 'transfer_ticket' is not expected");
}
}
}
Expand Down Expand Up @@ -283,7 +286,7 @@ public override async Task Commit(JsonElement block)
await new ContractEventCommit(this).Apply(blockCommit.Block, internalContent);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Sync/Protocols/Handlers/Proto2/Proto2Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public override async Task Commit(JsonElement block)
bigMapCommit.Append(internalTx.Transaction, internalTx.Transaction.Target as Contract, internalTx.BigMapDiffs);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Sync/Protocols/Handlers/Proto3/Proto3Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public override async Task Commit(JsonElement block)
bigMapCommit.Append(internalTx.Transaction, internalTx.Transaction.Target as Contract, internalTx.BigMapDiffs);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Sync/Protocols/Handlers/Proto4/Proto4Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public override async Task Commit(JsonElement block)
bigMapCommit.Append(internalTx.Transaction, internalTx.Transaction.Target as Contract, internalTx.BigMapDiffs);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Sync/Protocols/Handlers/Proto5/Proto5Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public override async Task Commit(JsonElement block)
bigMapCommit.Append(internalTx.Transaction, internalTx.Transaction.Target as Contract, internalTx.BigMapDiffs);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Sync/Protocols/Handlers/Proto6/Proto6Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public override async Task Commit(JsonElement block)
bigMapCommit.Append(internalTx.Transaction, internalTx.Transaction.Target as Contract, internalTx.BigMapDiffs);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Tzkt.Sync/Protocols/Handlers/Proto7/Proto7Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public override async Task Commit(JsonElement block)
bigMapCommit.Append(internalTx.Transaction, internalTx.Transaction.Target as Contract, internalTx.BigMapDiffs);
break;
default:
throw new NotImplementedException($"internal '{content.RequiredString("kind")}' is not implemented");
throw new NotImplementedException($"internal '{internalContent.RequiredString("kind")}' is not implemented");
}
}
}
Expand Down
Loading

0 comments on commit fd171da

Please sign in to comment.