diff --git a/cmd/tradelogs/migrations/000013_update_0xv3_event_hash.up.sql b/cmd/tradelogs/migrations/000013_update_0xv3_event_hash.up.sql new file mode 100644 index 0000000..176d0ac --- /dev/null +++ b/cmd/tradelogs/migrations/000013_update_0xv3_event_hash.up.sql @@ -0,0 +1,2 @@ +UPDATE tradelogs SET event_hash = '0x0000000000000000000000000000000000000000000000000000000000000000' + WHERE contract_address = '0x7966af62034313d87ede39380bf60f1a84c62be7' \ No newline at end of file diff --git a/pkg/parser/zxrfqv3/parser.go b/pkg/parser/zxrfqv3/parser.go index 740577a..1427d89 100644 --- a/pkg/parser/zxrfqv3/parser.go +++ b/pkg/parser/zxrfqv3/parser.go @@ -31,6 +31,8 @@ type Parser struct { l *zap.SugaredLogger } +const altEventHash = "0x0000000000000000000000000000000000000000000000000000000000000000" + func MustNewParserWithDeployer(cache *tracecall.Cache, ethClient *ethclient.Client, deployerAddress common.Address, contractAbiSupported ...ContractABI) *Parser { if isZeroAddress(deployerAddress) { log.Fatalf("deployer Address is zero Address") @@ -153,6 +155,7 @@ func (p *Parser) buildOrderByLog(log ethereumTypes.Log, blockTime uint64) (stora tradeLog.TxHash = log.TxHash.Hex() tradeLog.Timestamp = blockTime * 1000 tradeLog.ContractAddress = log.Address.Hex() + tradeLog.EventHash = altEventHash orderHash, err := getOrderHash(log.Data) if err != nil { return storage.TradeLog{}, fmt.Errorf("get order hash error %w", err) diff --git a/pkg/parser/zxrfqv3/test/expected_rfq.json b/pkg/parser/zxrfqv3/test/expected_rfq.json index 48d4b10..eb56764 100644 --- a/pkg/parser/zxrfqv3/test/expected_rfq.json +++ b/pkg/parser/zxrfqv3/test/expected_rfq.json @@ -9,6 +9,7 @@ "contract_address": "0x7966aF62034313D87Ede39380bf60f1A84c62BE7", "block_number": 20285760, "tx_hash": "0xb244877d0cf0badcf2ac82dbb3cbf338b420ab5d1c6e6630fce4a4874121e427", + "event_hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "log_index": 380, "timestamp": 1000, "expiration_date": 1720731029