From be6f1fa5fd3abec001d733bdc269108cf78aa1d6 Mon Sep 17 00:00:00 2001 From: daniel <4954577+jaensen@users.noreply.github.com> Date: Wed, 11 Sep 2024 00:23:21 +0200 Subject: [PATCH] Fixed parsing of ERC20WrapperDeployed.CirclesType --- Circles.Index.CirclesV2/Events.cs | 2 +- Circles.Index.CirclesV2/LogParser.cs | 6 +++--- Circles.Index/Circles.Index.csproj | 4 ++-- Readme.md | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Circles.Index.CirclesV2/Events.cs b/Circles.Index.CirclesV2/Events.cs index 38affa4..a247754 100644 --- a/Circles.Index.CirclesV2/Events.cs +++ b/Circles.Index.CirclesV2/Events.cs @@ -122,7 +122,7 @@ public record ERC20WrapperDeployed( string TransactionHash, string Avatar, string Erc20Wrapper, - byte CirclesType) : IIndexEvent; + long CirclesType) : IIndexEvent; public record Erc20WrapperTransfer( long BlockNumber, diff --git a/Circles.Index.CirclesV2/LogParser.cs b/Circles.Index.CirclesV2/LogParser.cs index 980015d..c5c5417 100644 --- a/Circles.Index.CirclesV2/LogParser.cs +++ b/Circles.Index.CirclesV2/LogParser.cs @@ -103,7 +103,7 @@ public IEnumerable ParseLog(Block block, Transaction transaction, T } var topic = log.Topics[0]; - + if (log.LoggersAddress == v2HubAddress) { if (topic == _stoppedTopic) @@ -210,7 +210,7 @@ private IIndexEvent Erc20WrapperDeployed(Block block, TxReceipt receipt, LogEntr // "event ERC20WrapperDeployed(address indexed avatar, address indexed erc20Wrapper, uint8 circlesType)" string avatar = "0x" + log.Topics[1].ToString().Substring(Consts.AddressEmptyBytesPrefixLength); string erc20Wrapper = "0x" + log.Topics[2].ToString().Substring(Consts.AddressEmptyBytesPrefixLength); - byte circlesType = log.Data[0]; + UInt256 circlesType = new UInt256(log.Data, true); Erc20WrapperAddresses.TryAdd(new Address(erc20Wrapper), null); @@ -222,7 +222,7 @@ private IIndexEvent Erc20WrapperDeployed(Block block, TxReceipt receipt, LogEntr receipt.TxHash!.ToString(), avatar, erc20Wrapper, - circlesType); + (long)(BigInteger)circlesType); } private URI Erc1155Uri(Block block, TxReceipt receipt, LogEntry log, int logIndex) diff --git a/Circles.Index/Circles.Index.csproj b/Circles.Index/Circles.Index.csproj index 3b8d3b9..0c69360 100644 --- a/Circles.Index/Circles.Index.csproj +++ b/Circles.Index/Circles.Index.csproj @@ -8,8 +8,8 @@ Daniel Janz (Gnosis Service GmbH) Gnosis Service GmbH Circles - 1.7.4 - 1.7.4 + 1.8.0 + 1.8.0 diff --git a/Readme.md b/Readme.md index 6e725e6..0b95fa8 100644 --- a/Readme.md +++ b/Readme.md @@ -302,7 +302,7 @@ curl -X POST --data '{ "id": 1, "method": "circles_getTokenBalances", "params": [ - "0xde374ece6fa50e781e81aac78e811b33d16912c7" + "0xd68193591d47740e51dfbc410da607a351b56586" ] }' -H "Content-Type: application/json" http://localhost:8545/ ```