@morpho-dev/router 0.0.21 → 0.0.23

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.
@@ -24,10 +24,11 @@ __export(Chain_exports, {
24
24
  chains: () => chains,
25
25
  getChain: () => getChain
26
26
  });
27
- var chainNames = ["ethereum", "base"];
27
+ var chainNames = ["ethereum", "base", "ethereum-virtual-testnet"];
28
28
  var ChainId = {
29
29
  ETHEREUM: BigInt(mainnet.id),
30
- BASE: BigInt(base.id)
30
+ BASE: BigInt(base.id),
31
+ "ETHEREUM-VIRTUAL-TESTNET": 121212n
31
32
  };
32
33
  var chainIds = new Set(Object.values(ChainId));
33
34
  var chainNameLookup = new Map(Object.entries(ChainId).map(([key, value]) => [value, key]));
@@ -66,6 +67,25 @@ var chains = {
66
67
  ].map((address) => address.toLowerCase())
67
68
  ),
68
69
  morpho: "0x0000000000000000000000000000000000000000"
70
+ },
71
+ "ethereum-virtual-testnet": {
72
+ ...mainnet,
73
+ id: 121212n,
74
+ name: "ethereum-virtual-testnet",
75
+ whitelistedAssets: new Set(
76
+ [
77
+ "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
78
+ // USDC
79
+ "0x6B175474E89094C44Da98b954EedeAC495271d0F"
80
+ // DAI
81
+ ].map((address) => address.toLowerCase())
82
+ ),
83
+ morpho: "0x0000000000000000000000000000000000000000",
84
+ mempool: {
85
+ address: "0x7be3164eeee8b35092f6128ec32c2e6ff8f6c890",
86
+ deploymentBlock: 23225668,
87
+ reindexBuffer: 10
88
+ }
69
89
  }
70
90
  };
71
91
 
@@ -1090,6 +1110,7 @@ __export(OfferStore_exports, {
1090
1110
  function memory(parameters) {
1091
1111
  const map = parameters.offers;
1092
1112
  const filled = parameters.filled;
1113
+ const indexingProgress = /* @__PURE__ */ new Map();
1093
1114
  const create = async (parameters2) => {
1094
1115
  if (map.has(parameters2.offer.hash.toLowerCase())) return parameters2.offer.hash;
1095
1116
  map.set(parameters2.offer.hash.toLowerCase(), {
@@ -1430,6 +1451,15 @@ function memory(parameters) {
1430
1451
  filledForOffering.set(nonce, parameters2.consumed);
1431
1452
  filledForChain.set(address, filledForOffering);
1432
1453
  filled.set(chainId, filledForChain);
1454
+ },
1455
+ saveLatestBlockNumberProcessed: async (parameters2) => {
1456
+ const key = `${parameters2.chainId.toString()}:${parameters2.eventType}`;
1457
+ indexingProgress.set(key, parameters2.latestBlockNumber);
1458
+ },
1459
+ getLatestBlockNumberProcessed: async (parameters2) => {
1460
+ const key = `${parameters2.chainId.toString()}:${parameters2.eventType}`;
1461
+ const value = indexingProgress.get(key);
1462
+ return value === void 0 ? null : { latestBlockNumber: value };
1433
1463
  }
1434
1464
  };
1435
1465
  }