From 6dc76f84f6f1abd2d8e69bbf12b5c8918381a4a9 Mon Sep 17 00:00:00 2001 From: alexey Date: Tue, 20 Feb 2024 10:13:20 +0000 Subject: [PATCH] :bug:redeployed contract with bugfix --- .../src/abi/SPOT_MARKET_ABI.ts | 32 ++++++++++++++++++- .../src/utils/fetchIndexer.ts | 4 +-- spark-frontend/src/abi/SPOT_MARKET_ABI.ts | 32 ++++++++++++++++++- spark-frontend/src/constants/index.ts | 8 +++-- 4 files changed, 69 insertions(+), 7 deletions(-) diff --git a/services/spark-matcher-evm/src/abi/SPOT_MARKET_ABI.ts b/services/spark-matcher-evm/src/abi/SPOT_MARKET_ABI.ts index e8bacfaf..9786ce08 100644 --- a/services/spark-matcher-evm/src/abi/SPOT_MARKET_ABI.ts +++ b/services/spark-matcher-evm/src/abi/SPOT_MARKET_ABI.ts @@ -25,6 +25,12 @@ export default [ name: "decimal", type: "uint32", }, + { + indexed: false, + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, ], name: "MarketCreateEvent", type: "event", @@ -62,6 +68,12 @@ export default [ name: "orderPrice", type: "uint256", }, + { + indexed: false, + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, ], name: "OrderChangeEvent", type: "event", @@ -76,11 +88,23 @@ export default [ type: "address", }, { - indexed: true, + indexed: false, internalType: "address", name: "matcher", type: "address", }, + { + indexed: true, + internalType: "address", + name: "seller", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "buyer", + type: "address", + }, { indexed: false, internalType: "uint256", @@ -93,6 +117,12 @@ export default [ name: "price", type: "uint256", }, + { + indexed: false, + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, ], name: "TradeEvent", type: "event", diff --git a/services/spark-matcher-evm/src/utils/fetchIndexer.ts b/services/spark-matcher-evm/src/utils/fetchIndexer.ts index 54804147..de5b37e2 100644 --- a/services/spark-matcher-evm/src/utils/fetchIndexer.ts +++ b/services/spark-matcher-evm/src/utils/fetchIndexer.ts @@ -1,8 +1,8 @@ import axios from "axios"; export const INDEXER_URLS = [ - "https://api.studio.thegraph.com/query/63182/arbitrum-sepolia-spot-market/version/latest", - "https://api.studio.thegraph.com/query/63182/spark-arbitrum-spor-market/version/latest", + "https://api.studio.thegraph.com/query/65658/spark-arbitrum-spor-market-2/version/latest", + "https://api.studio.thegraph.com/query/65658/spark-arbitrum-spor-market-3/version/latest", ]; export const fetchIndexer = async (query: string) => { diff --git a/spark-frontend/src/abi/SPOT_MARKET_ABI.ts b/spark-frontend/src/abi/SPOT_MARKET_ABI.ts index e8bacfaf..9786ce08 100644 --- a/spark-frontend/src/abi/SPOT_MARKET_ABI.ts +++ b/spark-frontend/src/abi/SPOT_MARKET_ABI.ts @@ -25,6 +25,12 @@ export default [ name: "decimal", type: "uint32", }, + { + indexed: false, + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, ], name: "MarketCreateEvent", type: "event", @@ -62,6 +68,12 @@ export default [ name: "orderPrice", type: "uint256", }, + { + indexed: false, + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, ], name: "OrderChangeEvent", type: "event", @@ -76,11 +88,23 @@ export default [ type: "address", }, { - indexed: true, + indexed: false, internalType: "address", name: "matcher", type: "address", }, + { + indexed: true, + internalType: "address", + name: "seller", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "buyer", + type: "address", + }, { indexed: false, internalType: "uint256", @@ -93,6 +117,12 @@ export default [ name: "price", type: "uint256", }, + { + indexed: false, + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, ], name: "TradeEvent", type: "event", diff --git a/spark-frontend/src/constants/index.ts b/spark-frontend/src/constants/index.ts index 351ffb7e..67dc6753 100644 --- a/spark-frontend/src/constants/index.ts +++ b/spark-frontend/src/constants/index.ts @@ -33,13 +33,15 @@ export const TV_DATAFEED = "https://spark-tv-datafeed.spark-defi.com/api/v1"; export const CHARTS_STORAGE = "https://tv-backend-v4.herokuapp.com/"; export const INDEXER_URLS = [ - "https://api.studio.thegraph.com/query/63182/arbitrum-sepolia-spot-market/version/latest", - "https://api.studio.thegraph.com/query/63182/spark-arbitrum-spor-market/version/latest", + // "https://api.studio.thegraph.com/query/63182/arbitrum-sepolia-spot-market/version/latest", + // "https://api.studio.thegraph.com/query/63182/spark-arbitrum-spor-market/version/latest", + "https://api.studio.thegraph.com/query/65658/spark-arbitrum-spor-market-2/version/latest", + "https://api.studio.thegraph.com/query/65658/spark-arbitrum-spor-market-3/version/latest", ]; export const INDEXER_URL = INDEXER_URLS[0]; export const CONTRACT_ADDRESSES = { - spotMarket: "0xE57B37774D718ED379157CDd356492232FA9aE7e", + spotMarket: "0x0DD4699013537cf77668E8461a6A1862Fa8cb5F5", tokenFactory: "0xc3d0426df8a40e7b4803f305537a83e7037be91596c393e7a6b693133f9d7301", pyth: "0x2b480dd77abdc48224a22b809608b445604f0de1a999160fb7f126cca2ffc108", proxy: "0x36eadaee6e25bd050239834703f3881f91cbc3cb3bb7c96f57483703d8ecba3f",