Skip to content

Commit be6f1fa

Browse files
committed
Fixed parsing of ERC20WrapperDeployed.CirclesType
1 parent c0f36ae commit be6f1fa

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Circles.Index.CirclesV2/Events.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public record ERC20WrapperDeployed(
122122
string TransactionHash,
123123
string Avatar,
124124
string Erc20Wrapper,
125-
byte CirclesType) : IIndexEvent;
125+
long CirclesType) : IIndexEvent;
126126

127127
public record Erc20WrapperTransfer(
128128
long BlockNumber,

Circles.Index.CirclesV2/LogParser.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public IEnumerable<IIndexEvent> ParseLog(Block block, Transaction transaction, T
103103
}
104104

105105
var topic = log.Topics[0];
106-
106+
107107
if (log.LoggersAddress == v2HubAddress)
108108
{
109109
if (topic == _stoppedTopic)
@@ -210,7 +210,7 @@ private IIndexEvent Erc20WrapperDeployed(Block block, TxReceipt receipt, LogEntr
210210
// "event ERC20WrapperDeployed(address indexed avatar, address indexed erc20Wrapper, uint8 circlesType)"
211211
string avatar = "0x" + log.Topics[1].ToString().Substring(Consts.AddressEmptyBytesPrefixLength);
212212
string erc20Wrapper = "0x" + log.Topics[2].ToString().Substring(Consts.AddressEmptyBytesPrefixLength);
213-
byte circlesType = log.Data[0];
213+
UInt256 circlesType = new UInt256(log.Data, true);
214214

215215
Erc20WrapperAddresses.TryAdd(new Address(erc20Wrapper), null);
216216

@@ -222,7 +222,7 @@ private IIndexEvent Erc20WrapperDeployed(Block block, TxReceipt receipt, LogEntr
222222
receipt.TxHash!.ToString(),
223223
avatar,
224224
erc20Wrapper,
225-
circlesType);
225+
(long)(BigInteger)circlesType);
226226
}
227227

228228
private URI Erc1155Uri(Block block, TxReceipt receipt, LogEntry log, int logIndex)

Circles.Index/Circles.Index.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<Authors>Daniel Janz (Gnosis Service GmbH)</Authors>
99
<Copyright>Gnosis Service GmbH</Copyright>
1010
<Product>Circles</Product>
11-
<AssemblyVersion>1.7.4</AssemblyVersion>
12-
<FileVersion>1.7.4</FileVersion>
11+
<AssemblyVersion>1.8.0</AssemblyVersion>
12+
<FileVersion>1.8.0</FileVersion>
1313
</PropertyGroup>
1414

1515

Readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ curl -X POST --data '{
302302
"id": 1,
303303
"method": "circles_getTokenBalances",
304304
"params": [
305-
"0xde374ece6fa50e781e81aac78e811b33d16912c7"
305+
"0xd68193591d47740e51dfbc410da607a351b56586"
306306
]
307307
}' -H "Content-Type: application/json" http://localhost:8545/
308308
```

0 commit comments

Comments
 (0)