Skip to content

Commit

Permalink
Fixed parsing of ERC20WrapperDeployed.CirclesType
Browse files Browse the repository at this point in the history
  • Loading branch information
jaensen committed Sep 10, 2024
1 parent c0f36ae commit be6f1fa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Circles.Index.CirclesV2/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public record ERC20WrapperDeployed(
string TransactionHash,
string Avatar,
string Erc20Wrapper,
byte CirclesType) : IIndexEvent;
long CirclesType) : IIndexEvent;

public record Erc20WrapperTransfer(
long BlockNumber,
Expand Down
6 changes: 3 additions & 3 deletions Circles.Index.CirclesV2/LogParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public IEnumerable<IIndexEvent> ParseLog(Block block, Transaction transaction, T
}

var topic = log.Topics[0];

if (log.LoggersAddress == v2HubAddress)
{
if (topic == _stoppedTopic)
Expand Down Expand Up @@ -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);

Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Circles.Index/Circles.Index.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<Authors>Daniel Janz (Gnosis Service GmbH)</Authors>
<Copyright>Gnosis Service GmbH</Copyright>
<Product>Circles</Product>
<AssemblyVersion>1.7.4</AssemblyVersion>
<FileVersion>1.7.4</FileVersion>
<AssemblyVersion>1.8.0</AssemblyVersion>
<FileVersion>1.8.0</FileVersion>
</PropertyGroup>


Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ curl -X POST --data '{
"id": 1,
"method": "circles_getTokenBalances",
"params": [
"0xde374ece6fa50e781e81aac78e811b33d16912c7"
"0xd68193591d47740e51dfbc410da607a351b56586"
]
}' -H "Content-Type: application/json" http://localhost:8545/
```
Expand Down

0 comments on commit be6f1fa

Please sign in to comment.