@morpho-dev/router 0.0.22 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,7 +26,8 @@ __export(Chain_exports, {
26
26
  var chainNames = ["ethereum", "base", "ethereum-virtual-testnet"];
27
27
  var ChainId = {
28
28
  ETHEREUM: BigInt(mainnet.id),
29
- BASE: BigInt(base.id)
29
+ BASE: BigInt(base.id),
30
+ "ETHEREUM-VIRTUAL-TESTNET": 121212n
30
31
  };
31
32
  var chainIds = new Set(Object.values(ChainId));
32
33
  var chainNameLookup = new Map(Object.entries(ChainId).map(([key, value]) => [value, key]));
@@ -68,7 +69,7 @@ var chains = {
68
69
  },
69
70
  "ethereum-virtual-testnet": {
70
71
  ...mainnet,
71
- id: 1111n,
72
+ id: 121212n,
72
73
  name: "ethereum-virtual-testnet",
73
74
  whitelistedAssets: new Set(
74
75
  [
@@ -78,7 +79,12 @@ var chains = {
78
79
  // DAI
79
80
  ].map((address) => address.toLowerCase())
80
81
  ),
81
- morpho: "0x0000000000000000000000000000000000000000"
82
+ morpho: "0x0000000000000000000000000000000000000000",
83
+ mempool: {
84
+ address: "0x7be3164eeee8b35092f6128ec32c2e6ff8f6c890",
85
+ deploymentBlock: 23225668,
86
+ reindexBuffer: 10
87
+ }
82
88
  }
83
89
  };
84
90
 
@@ -1083,6 +1089,7 @@ __export(OfferStore_exports, {
1083
1089
  function memory(parameters) {
1084
1090
  const map = parameters.offers;
1085
1091
  const filled = parameters.filled;
1092
+ const indexingProgress = /* @__PURE__ */ new Map();
1086
1093
  const create = async (parameters2) => {
1087
1094
  if (map.has(parameters2.offer.hash.toLowerCase())) return parameters2.offer.hash;
1088
1095
  map.set(parameters2.offer.hash.toLowerCase(), {
@@ -1423,6 +1430,15 @@ function memory(parameters) {
1423
1430
  filledForOffering.set(nonce, parameters2.consumed);
1424
1431
  filledForChain.set(address, filledForOffering);
1425
1432
  filled.set(chainId, filledForChain);
1433
+ },
1434
+ saveLatestBlockNumberProcessed: async (parameters2) => {
1435
+ const key = `${parameters2.chainId.toString()}:${parameters2.eventType}`;
1436
+ indexingProgress.set(key, parameters2.latestBlockNumber);
1437
+ },
1438
+ getLatestBlockNumberProcessed: async (parameters2) => {
1439
+ const key = `${parameters2.chainId.toString()}:${parameters2.eventType}`;
1440
+ const value = indexingProgress.get(key);
1441
+ return value === void 0 ? null : { latestBlockNumber: value };
1426
1442
  }
1427
1443
  };
1428
1444
  }