@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.
- package/README.md +5 -16
- package/dist/index.browser.d.cts +20 -1
- package/dist/index.browser.d.ts +20 -1
- package/dist/index.browser.js +32 -2
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +32 -2
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.cts +20 -1
- package/dist/index.node.d.ts +20 -1
- package/dist/index.node.js +32 -2
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +32 -2
- package/dist/index.node.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.browser.mjs
CHANGED
|
@@ -23,10 +23,11 @@ __export(Chain_exports, {
|
|
|
23
23
|
chains: () => chains,
|
|
24
24
|
getChain: () => getChain
|
|
25
25
|
});
|
|
26
|
-
var chainNames = ["ethereum", "base"];
|
|
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]));
|
|
@@ -65,6 +66,25 @@ var chains = {
|
|
|
65
66
|
].map((address) => address.toLowerCase())
|
|
66
67
|
),
|
|
67
68
|
morpho: "0x0000000000000000000000000000000000000000"
|
|
69
|
+
},
|
|
70
|
+
"ethereum-virtual-testnet": {
|
|
71
|
+
...mainnet,
|
|
72
|
+
id: 121212n,
|
|
73
|
+
name: "ethereum-virtual-testnet",
|
|
74
|
+
whitelistedAssets: new Set(
|
|
75
|
+
[
|
|
76
|
+
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
77
|
+
// USDC
|
|
78
|
+
"0x6B175474E89094C44Da98b954EedeAC495271d0F"
|
|
79
|
+
// DAI
|
|
80
|
+
].map((address) => address.toLowerCase())
|
|
81
|
+
),
|
|
82
|
+
morpho: "0x0000000000000000000000000000000000000000",
|
|
83
|
+
mempool: {
|
|
84
|
+
address: "0x7be3164eeee8b35092f6128ec32c2e6ff8f6c890",
|
|
85
|
+
deploymentBlock: 23225668,
|
|
86
|
+
reindexBuffer: 10
|
|
87
|
+
}
|
|
68
88
|
}
|
|
69
89
|
};
|
|
70
90
|
|
|
@@ -1069,6 +1089,7 @@ __export(OfferStore_exports, {
|
|
|
1069
1089
|
function memory(parameters) {
|
|
1070
1090
|
const map = parameters.offers;
|
|
1071
1091
|
const filled = parameters.filled;
|
|
1092
|
+
const indexingProgress = /* @__PURE__ */ new Map();
|
|
1072
1093
|
const create = async (parameters2) => {
|
|
1073
1094
|
if (map.has(parameters2.offer.hash.toLowerCase())) return parameters2.offer.hash;
|
|
1074
1095
|
map.set(parameters2.offer.hash.toLowerCase(), {
|
|
@@ -1409,6 +1430,15 @@ function memory(parameters) {
|
|
|
1409
1430
|
filledForOffering.set(nonce, parameters2.consumed);
|
|
1410
1431
|
filledForChain.set(address, filledForOffering);
|
|
1411
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 };
|
|
1412
1442
|
}
|
|
1413
1443
|
};
|
|
1414
1444
|
}
|