@morpho-dev/router 0.0.22 → 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.
- package/dist/index.browser.d.cts +19 -0
- package/dist/index.browser.d.ts +19 -0
- package/dist/index.browser.js +19 -3
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +19 -3
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.cts +19 -0
- package/dist/index.node.d.ts +19 -0
- package/dist/index.node.js +19 -3
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +19 -3
- package/dist/index.node.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.node.mjs
CHANGED
|
@@ -27,7 +27,8 @@ __export(Chain_exports, {
|
|
|
27
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]));
|
|
@@ -69,7 +70,7 @@ var chains = {
|
|
|
69
70
|
},
|
|
70
71
|
"ethereum-virtual-testnet": {
|
|
71
72
|
...mainnet,
|
|
72
|
-
id:
|
|
73
|
+
id: 121212n,
|
|
73
74
|
name: "ethereum-virtual-testnet",
|
|
74
75
|
whitelistedAssets: new Set(
|
|
75
76
|
[
|
|
@@ -79,7 +80,12 @@ var chains = {
|
|
|
79
80
|
// DAI
|
|
80
81
|
].map((address) => address.toLowerCase())
|
|
81
82
|
),
|
|
82
|
-
morpho: "0x0000000000000000000000000000000000000000"
|
|
83
|
+
morpho: "0x0000000000000000000000000000000000000000",
|
|
84
|
+
mempool: {
|
|
85
|
+
address: "0x7be3164eeee8b35092f6128ec32c2e6ff8f6c890",
|
|
86
|
+
deploymentBlock: 23225668,
|
|
87
|
+
reindexBuffer: 10
|
|
88
|
+
}
|
|
83
89
|
}
|
|
84
90
|
};
|
|
85
91
|
|
|
@@ -1104,6 +1110,7 @@ __export(OfferStore_exports, {
|
|
|
1104
1110
|
function memory(parameters) {
|
|
1105
1111
|
const map = parameters.offers;
|
|
1106
1112
|
const filled = parameters.filled;
|
|
1113
|
+
const indexingProgress = /* @__PURE__ */ new Map();
|
|
1107
1114
|
const create = async (parameters2) => {
|
|
1108
1115
|
if (map.has(parameters2.offer.hash.toLowerCase())) return parameters2.offer.hash;
|
|
1109
1116
|
map.set(parameters2.offer.hash.toLowerCase(), {
|
|
@@ -1444,6 +1451,15 @@ function memory(parameters) {
|
|
|
1444
1451
|
filledForOffering.set(nonce, parameters2.consumed);
|
|
1445
1452
|
filledForChain.set(address, filledForOffering);
|
|
1446
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 };
|
|
1447
1463
|
}
|
|
1448
1464
|
};
|
|
1449
1465
|
}
|