Skip to content

Commit

Permalink
fix load bug (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinlau20100 authored Jun 4, 2024
1 parent 674961a commit 75900db
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 68 deletions.
3 changes: 1 addition & 2 deletions src/market.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ import {
isOrderExpired,
} from "./utils";
import * as types from "./types";
import { EventType, OrderbookEvent } from "./events";
import { EventType } from "./events";
import { assetToIndex } from "./assets";
import { Asset } from "./constants";
import { getDecodedMarket } from "./serum/generate-decoded";

export class ZetaGroupMarkets {
/**
Expand Down
128 changes: 64 additions & 64 deletions src/serum/MARKET-STORE.mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"baseMint": "2ZLdhFsrkAtdn9Kud4SZvqchQFvn5jVCHUdJ83vumKyR",
"quoteMint": "BKt2FdgBahn77joeawhNidswFxfgasPYCHWghRL4AKBR",
"baseVault": "BEjGhNFnKT5weGtpBoFs5Y1mDN47Ntvag5aMV59nZRpk",
"baseDepositsTotal": "50059425",
"baseDepositsTotal": "23756541",
"baseFeesAccrued": "0",
"quoteVault": "CHBUBfU3zscTNsihdK3x44TbpTza1hwcsTUaZfk751b5",
"quoteDepositsTotal": "7399270967832800",
"quoteDepositsTotal": "4502130129414000",
"quoteFeesAccrued": "0",
"quoteDustThreshold": "0",
"requestQueue": "EaNR74nCjrYyNDsuoWmq19pH76QSd1nuTzvJSr3RDQ6x",
Expand All @@ -33,8 +33,8 @@
"pruneAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"consumeEventsAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"epochLength": "65535",
"epochStartTs": "1715640765",
"startEpochSeqNum": "257900933"
"epochStartTs": "1717475745",
"startEpochSeqNum": "275594095"
}
},
"BTC": {
Expand All @@ -53,10 +53,10 @@
"baseMint": "63DZkAzoDXmzGzn9esoWSYpMLo4YB9oPHXreHKwuu4HA",
"quoteMint": "DhMH8oRQoAAb6poHVsvCqq3NCMj6aKUH2tGQG5Lo4bCg",
"baseVault": "DbzL5mT4nBaxuAs8ti4UeT2qougRBdujxa7GhLndM5Jz",
"baseDepositsTotal": "57516",
"baseDepositsTotal": "43801",
"baseFeesAccrued": "0",
"quoteVault": "7M9xhY2ARnrkCaBK5SNM3Lyd3FdbTu2EWBwG4TQcqpsv",
"quoteDepositsTotal": "3881586661511600",
"quoteDepositsTotal": "3047487083558900",
"quoteFeesAccrued": "0",
"quoteDustThreshold": "0",
"requestQueue": "6JSdqUr24mBt4MCQrZHRoSfeZbjgALx4MQunZwD8Uarg",
Expand All @@ -71,8 +71,8 @@
"pruneAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"consumeEventsAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"epochLength": "65535",
"epochStartTs": "1715640765",
"startEpochSeqNum": "168987180"
"epochStartTs": "1717475745",
"startEpochSeqNum": "186610212"
}
},
"ETH": {
Expand All @@ -91,10 +91,10 @@
"baseMint": "2Stzi7XE3btUQXaauTVB9brPAtPmGnrEDSJmp3w5VY2j",
"quoteMint": "5Ehp2LtTRmjug39GphXhFEeguz7hGeg41N1U49wU8Kov",
"baseVault": "9YVE9r9cHFZNwm91p3Js8NBWVznesLSM8FZyswG2MG1B",
"baseDepositsTotal": "821070",
"baseDepositsTotal": "772360",
"baseFeesAccrued": "0",
"quoteVault": "DecjLCYjb7jdDp2UqA2MS4xjgDjZfvdgMjvkRW7oWs9L",
"quoteDepositsTotal": "2800423104416000",
"quoteDepositsTotal": "2998037721549000",
"quoteFeesAccrued": "0",
"quoteDustThreshold": "0",
"requestQueue": "A7D8zuxAmtui3XKz2VcxthAZ5HuwLbN74rrDapMJ3Z5d",
Expand All @@ -109,8 +109,8 @@
"pruneAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"consumeEventsAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"epochLength": "65535",
"epochStartTs": "1715640765",
"startEpochSeqNum": "181686059"
"epochStartTs": "1717475745",
"startEpochSeqNum": "196997817"
}
},
"APT": {
Expand All @@ -129,10 +129,10 @@
"baseMint": "GuNWJSV4k95FZdwhAcjdaPGGoh9cArc27yV4P54QwWdg",
"quoteMint": "6S6WYL1mQFmVxsf3ft5MEH8hzxJA1LcUDzgwdJDj3yxc",
"baseVault": "GqCVQuGMf8YkiaJkSrD98D3WZxFfktcKzAwdBEQsx1th",
"baseDepositsTotal": "34995900",
"baseDepositsTotal": "46655300",
"baseFeesAccrued": "0",
"quoteVault": "2BpEtArGNotp97DjVKwhYZ86WEq2Y5bLtGGDvicuJ9br",
"quoteDepositsTotal": "265743086740000",
"quoteDepositsTotal": "489395169670000",
"quoteFeesAccrued": "0",
"quoteDustThreshold": "0",
"requestQueue": "EPf7hymYW7bnwiBYGTRF4Ji2jJ2yTdn4XMTpR6N4zsGA",
Expand All @@ -147,8 +147,8 @@
"pruneAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"consumeEventsAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"epochLength": "65535",
"epochStartTs": "1715640765",
"startEpochSeqNum": "179532152"
"epochStartTs": "1717475745",
"startEpochSeqNum": "184652823"
}
},
"ARB": {
Expand All @@ -167,10 +167,10 @@
"baseMint": "Eqt3anUy8nqDvzJaNvWvqBM32Ln4UUnLkfvdd9Ztfj81",
"quoteMint": "7j1N5UiXLFxaxFWq5tzZc5R3sjPHcF7jqfHJgAtE74q8",
"baseVault": "GnSRgncxFbtxqZ4HmfnF6daCmgkc8tuQz9i37hUmwV5t",
"baseDepositsTotal": "534497000",
"baseDepositsTotal": "371260500",
"baseFeesAccrued": "0",
"quoteVault": "6JjDgGzqzU6Az7ZmTARAvBSwBxfXsqbVG3Rc9JGU9i4L",
"quoteDepositsTotal": "499814023800000",
"quoteDepositsTotal": "419379744250000",
"quoteFeesAccrued": "0",
"quoteDustThreshold": "0",
"requestQueue": "gP91avgCrV9KB2ATgRtMCNN2AN7oU9hK1frENe17QkR",
Expand All @@ -185,8 +185,8 @@
"pruneAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"consumeEventsAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"epochLength": "65535",
"epochStartTs": "1715640765",
"startEpochSeqNum": "164903696"
"epochStartTs": "1717475745",
"startEpochSeqNum": "173908411"
}
},
"BNB": {
Expand All @@ -205,10 +205,10 @@
"baseMint": "B6sV248kSsj6n72osn3Wcuz87JX3RFMD7FZpgwdYGQTm",
"quoteMint": "5DPKMXmf9WK1C6N1MoJLWjYApiP4KR8zNf1oofevGEub",
"baseVault": "GNp5Q8fwD45azybdXKfuYYTHRkUh2krX9ejYuNKMFNmR",
"baseDepositsTotal": "268080",
"baseDepositsTotal": "636030",
"baseFeesAccrued": "0",
"quoteVault": "DZdqa3nVJmyPc2ei397Cr1TufzZiNG3G6aRrV1AZ52p7",
"quoteDepositsTotal": "165449298914000",
"quoteDepositsTotal": "459284425874000",
"quoteFeesAccrued": "0",
"quoteDustThreshold": "0",
"requestQueue": "Ao4fdNfwP1KPUwxoKbKVZ3Jp12MiCsK8gvvxbumn75by",
Expand All @@ -223,8 +223,8 @@
"pruneAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"consumeEventsAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"epochLength": "65535",
"epochStartTs": "1715640765",
"startEpochSeqNum": "31500313"
"epochStartTs": "1717475745",
"startEpochSeqNum": "35129965"
}
},
"PYTH": {
Expand All @@ -243,10 +243,10 @@
"baseMint": "5Q245C352ChdBGWmNbiYmFneAUiMjhnbPwUqmdHWJ8U6",
"quoteMint": "7Pnbf6WLGpsYjbjnQN4t8wMCzdDGsx9ZAyuLd4vZmN49",
"baseVault": "7cdY8U9Q5T5ktvF8VtkkZ1E7bt5mqbcQJQUw4433uEaV",
"baseDepositsTotal": "1152586000",
"baseDepositsTotal": "1291630000",
"baseFeesAccrued": "0",
"quoteVault": "137rR2TJ7ryu7nBxNNCeCdXqEt79jQLo4YvTzhEoAEh4",
"quoteDepositsTotal": "414654945893900",
"quoteDepositsTotal": "653040152100000",
"quoteFeesAccrued": "0",
"quoteDustThreshold": "0",
"requestQueue": "DCSXWke6HzdA8J6FhcxxM7mrdr4mkNhN32KjVAPtCZeG",
Expand All @@ -261,8 +261,8 @@
"pruneAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"consumeEventsAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"epochLength": "65535",
"epochStartTs": "1715640765",
"startEpochSeqNum": "55836739"
"epochStartTs": "1717475745",
"startEpochSeqNum": "61567686"
}
},
"TIA": {
Expand All @@ -281,10 +281,10 @@
"baseMint": "Bm6PXLobn7LBudgNdJKzUUNumAKAnEWuCoLVafsvPBda",
"quoteMint": "JB7F3kQvRYcQj8kogwGR78CMshg857E96ef4LQYDzSu1",
"baseVault": "CXWkPH6BzU8dhNy3LQkaCH54jSxQATyp11wHuhsAzT9n",
"baseDepositsTotal": "74626690",
"baseDepositsTotal": "53618990",
"baseFeesAccrued": "0",
"quoteVault": "2x1c7fXQdL5TDK9jbMvJ5VYM7wmPKUAQXrLAAFjvxSoc",
"quoteDepositsTotal": "656933285040000",
"quoteDepositsTotal": "664473297150000",
"quoteFeesAccrued": "0",
"quoteDustThreshold": "0",
"requestQueue": "6xkyhooKT2wnciP7xjipque9SDwHwPPamwsprsoVXgg9",
Expand All @@ -299,8 +299,8 @@
"pruneAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"consumeEventsAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"epochLength": "65535",
"epochStartTs": "1715640765",
"startEpochSeqNum": "49554801"
"epochStartTs": "1717475745",
"startEpochSeqNum": "55474265"
}
},
"JTO": {
Expand All @@ -319,10 +319,10 @@
"baseMint": "Avy1abPkJKJdadFVieTuF8oeN6ZFWsKNtKzU1a8tgn6Z",
"quoteMint": "GZycSPLqxhZuQYmv5wWjdwK4v3T1WStBpGxYem691vMG",
"baseVault": "2BXEjZqnRBhj3BrRbMERWnToEKErzxZmLPzLEmBHKdJT",
"baseDepositsTotal": "212063100",
"baseDepositsTotal": "165916500",
"baseFeesAccrued": "0",
"quoteVault": "9g3YcLnENdQKYCxg88o1VUhSXJQVD3Kf7uMVB7d1SyuG",
"quoteDepositsTotal": "861520705330000",
"quoteDepositsTotal": "655940447190000",
"quoteFeesAccrued": "0",
"quoteDustThreshold": "0",
"requestQueue": "9uYZdYf8aQd9YK6UrGUmz78pYpHscgHdD5f4cZojvmpH",
Expand All @@ -337,8 +337,8 @@
"pruneAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"consumeEventsAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"epochLength": "65535",
"epochStartTs": "1715640765",
"startEpochSeqNum": "49297352"
"epochStartTs": "1717475745",
"startEpochSeqNum": "59566722"
}
},
"ONEMBONK": {
Expand All @@ -357,10 +357,10 @@
"baseMint": "GdAX1L7jNsMmfN3kcCijk774aE2UtARV8frTozeUWT2E",
"quoteMint": "J7yjhCLdftzL95kGetry8pyX4eXn4Tjjh7KoWo599Sry",
"baseVault": "gn46ys7QKtWqQAW2MsuSV475AcFGn7gdNnSCLgw71DL",
"baseDepositsTotal": "53394700",
"baseDepositsTotal": "23574100",
"baseFeesAccrued": "0",
"quoteVault": "HTN3dEduTUp2VuFgo885BJ3KTp8WrPrZgEPiCVg2cVtD",
"quoteDepositsTotal": "1516061971620000",
"quoteDepositsTotal": "975917339990000",
"quoteFeesAccrued": "0",
"quoteDustThreshold": "0",
"requestQueue": "CgUMT14wR6WHX9mKMS5BWtd4tk39hRxbxtNRvp4BdMHf",
Expand All @@ -375,8 +375,8 @@
"pruneAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"consumeEventsAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"epochLength": "65535",
"epochStartTs": "1715640765",
"startEpochSeqNum": "36258903"
"epochStartTs": "1717475745",
"startEpochSeqNum": "43181080"
}
},
"SEI": {
Expand All @@ -395,10 +395,10 @@
"baseMint": "EU9uvnDuqNgunfmnxNAjhYi8iEKV3m7gnr5vatg2tgPj",
"quoteMint": "9Lsei9qMonizuuusFgdh94djt7fpgktGmh9PRi2j2GUQ",
"baseVault": "5xSPk47YF3HCoU4wA4HR6KmzQK9whiA8HeUMBcGo9HXn",
"baseDepositsTotal": "1738932000",
"baseDepositsTotal": "1445696000",
"baseFeesAccrued": "0",
"quoteVault": "BWhHgAgRXoyLfTU33iZ31ME2bk6WTYZxSr74eUqJsJUM",
"quoteDepositsTotal": "657443764600000",
"quoteDepositsTotal": "714871560100000",
"quoteFeesAccrued": "0",
"quoteDustThreshold": "0",
"requestQueue": "APx2hFAqRAtbN6N7LdvYzDCtqGMGWySqVuvg9iMWfkZ8",
Expand All @@ -413,8 +413,8 @@
"pruneAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"consumeEventsAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"epochLength": "65535",
"epochStartTs": "1715640765",
"startEpochSeqNum": "29018277"
"epochStartTs": "1717475745",
"startEpochSeqNum": "34763218"
}
},
"JUP": {
Expand All @@ -433,10 +433,10 @@
"baseMint": "2Vaf7yEBXi86SGhDM79w1dRQxz5NC2YFWshm5NxkRUDB",
"quoteMint": "DdFzaannSyXs12sB517GbtCsZihh8X9RS2ZKJKuTp5sG",
"baseVault": "5raajUcFKgaRbyh6yRkAKWroLe6PwtgCAU1vT7wmmpFu",
"baseDepositsTotal": "1339611000",
"baseDepositsTotal": "981640000",
"baseFeesAccrued": "0",
"quoteVault": "7Hz86pfpm5hxmzuJbNFbfJ8LEU8EnLL7fc3oyFgVrm5G",
"quoteDepositsTotal": "1508989059400000",
"quoteDepositsTotal": "1407672839100000",
"quoteFeesAccrued": "0",
"quoteDustThreshold": "0",
"requestQueue": "GkjperyMoy6MCUyg73KzZy4WbfaRhKYAoTBjW3JRjYuG",
Expand All @@ -451,8 +451,8 @@
"pruneAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"consumeEventsAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"epochLength": "65535",
"epochStartTs": "1715640765",
"startEpochSeqNum": "25352629"
"epochStartTs": "1717475745",
"startEpochSeqNum": "31842037"
}
},
"DYM": {
Expand All @@ -471,10 +471,10 @@
"baseMint": "MPT1KEM3kE5XQZCYrMrvQqEVUJwdnkgbAhrrwvYeYa1",
"quoteMint": "7cwSf9v33vH7HDcbD9fLTa7Dwr6e91f8C3aUMHuNkvHg",
"baseVault": "4E2zitVTKfaJB91DJ3JvCR9yr3KcRAKmHee3GQcqmqMu",
"baseDepositsTotal": "254516500",
"baseDepositsTotal": "97097900",
"baseFeesAccrued": "0",
"quoteVault": "APNsyPLc1dNRzwk9C6puX8s7vtUFC6U2o7wyZ7kxk3GV",
"quoteDepositsTotal": "697789824390000",
"quoteDepositsTotal": "310969595020000",
"quoteFeesAccrued": "0",
"quoteDustThreshold": "0",
"requestQueue": "Er174YjnV2nuAacfV4nYCAFBgJ6cTgJNaYNp5xPwGZUq",
Expand All @@ -489,8 +489,8 @@
"pruneAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"consumeEventsAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"epochLength": "65535",
"epochStartTs": "1715640765",
"startEpochSeqNum": "13615794"
"epochStartTs": "1717475745",
"startEpochSeqNum": "17869528"
}
},
"STRK": {
Expand All @@ -509,10 +509,10 @@
"baseMint": "EV1UdC9dSz7a66hqYW5TkVe6JihSAyfEwVLwYzy1cGXz",
"quoteMint": "ygRrmycNpMzEsqLYRpDMS9J1SHaFMG4Rm3tjkyVGVnc",
"baseVault": "CdES4frNaF9AvE1Hyso6wbW3jaB1jR7HpZiSNSP4bC7m",
"baseDepositsTotal": "423850000",
"baseDepositsTotal": "406947000",
"baseFeesAccrued": "0",
"quoteVault": "4qdMQ6iLN8Mm4Sa8geNkF1E2PmYN4zB9mGdeW4kxMGBY",
"quoteDepositsTotal": "461758161600000",
"quoteDepositsTotal": "595582326800000",
"quoteFeesAccrued": "0",
"quoteDustThreshold": "0",
"requestQueue": "2SgUVRAWs1yuUjiYW8JCHb4g7R2gBHdEk5x9KJgn9zNy",
Expand All @@ -527,8 +527,8 @@
"pruneAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"consumeEventsAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"epochLength": "65535",
"epochStartTs": "1715640765",
"startEpochSeqNum": "13021289"
"epochStartTs": "1717475745",
"startEpochSeqNum": "17902443"
}
},
"WIF": {
Expand All @@ -547,10 +547,10 @@
"baseMint": "H3j7orNNo7pzzHJZ1WFsrpJAxWCiE8QW3aatbGufu2PC",
"quoteMint": "GpvkM2TeZXqQzFtBBgqoJYfc3BPScEHaSk41dwMrsKiW",
"baseVault": "FnDtHqrTuySW94Yy3QFYjMtvyYuJkRp3H6xtDDG1Ehi",
"baseDepositsTotal": "335387000",
"baseDepositsTotal": "160804000",
"baseFeesAccrued": "0",
"quoteVault": "KsUoxhYnaTUFTJ6SuAdAAmUBVrExhCq7SXE7BCu5irh",
"quoteDepositsTotal": "1413713538900000",
"quoteDepositsTotal": "416126787800000",
"quoteFeesAccrued": "0",
"quoteDustThreshold": "0",
"requestQueue": "AXrWGEh3c8Jiz2Uhr6kiUxYypjgVYanm48jSWhXjudV8",
Expand All @@ -565,8 +565,8 @@
"pruneAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"consumeEventsAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"epochLength": "65535",
"epochStartTs": "1715640765",
"startEpochSeqNum": "4667201"
"epochStartTs": "1717475745",
"startEpochSeqNum": "10566459"
}
},
"RNDR": {
Expand All @@ -585,10 +585,10 @@
"baseMint": "AofYjza6fUWPMUnrXt2mpFs1Z19Pbqpt6jddMLZtP3c9",
"quoteMint": "GdCnmCAMVmWkEBBXhzT6wjtjuWYT6kxatQEuRVdmp7rw",
"baseVault": "975f8PQYUDjRB2Cb5AMhMvuGdtZ9QTN3BmZ9CwgUeKBc",
"baseDepositsTotal": "0",
"baseDepositsTotal": "50903000",
"baseFeesAccrued": "0",
"quoteVault": "8cMRt9XEWvvmAHPk4gGrELwjBcGbVwsZBmsw88DJKBui",
"quoteDepositsTotal": "0",
"quoteDepositsTotal": "767711824200000",
"quoteFeesAccrued": "0",
"quoteDustThreshold": "0",
"requestQueue": "Bdbf9vq1uFucPdFCvpqEuDYnJgLhdgDG7qyFuNgyX1yn",
Expand All @@ -603,8 +603,8 @@
"pruneAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"consumeEventsAuthority": "AVNMK6wiGfppdQNg9WKfMRBXefDPGZFh2f3o1fRbgN8n",
"epochLength": "65535",
"epochStartTs": "1715640765",
"startEpochSeqNum": "0"
"epochStartTs": "1717475745",
"startEpochSeqNum": "3782579"
}
}
}
Loading

0 comments on commit 75900db

Please sign in to comment.