@morpho-dev/router 0.0.20 → 0.0.22
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 +16 -28
- package/dist/index.browser.d.ts +16 -28
- package/dist/index.browser.js +19 -14
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +19 -14
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.cts +119 -70
- package/dist/index.node.d.ts +119 -70
- package/dist/index.node.js +1466 -56992
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +1469 -56970
- package/dist/index.node.mjs.map +1 -1
- package/package.json +5 -6
- package/dist/bytecode/erc20.txt +0 -1
package/dist/index.browser.mjs
CHANGED
|
@@ -23,7 +23,7 @@ __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
29
|
BASE: BigInt(base.id)
|
|
@@ -65,6 +65,20 @@ var chains = {
|
|
|
65
65
|
].map((address) => address.toLowerCase())
|
|
66
66
|
),
|
|
67
67
|
morpho: "0x0000000000000000000000000000000000000000"
|
|
68
|
+
},
|
|
69
|
+
"ethereum-virtual-testnet": {
|
|
70
|
+
...mainnet,
|
|
71
|
+
id: 1111n,
|
|
72
|
+
name: "ethereum-virtual-testnet",
|
|
73
|
+
whitelistedAssets: new Set(
|
|
74
|
+
[
|
|
75
|
+
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
76
|
+
// USDC
|
|
77
|
+
"0x6B175474E89094C44Da98b954EedeAC495271d0F"
|
|
78
|
+
// DAI
|
|
79
|
+
].map((address) => address.toLowerCase())
|
|
80
|
+
),
|
|
81
|
+
morpho: "0x0000000000000000000000000000000000000000"
|
|
68
82
|
}
|
|
69
83
|
};
|
|
70
84
|
|
|
@@ -1416,22 +1430,13 @@ function memory(parameters) {
|
|
|
1416
1430
|
// src/RouterEvent.ts
|
|
1417
1431
|
var RouterEvent_exports = {};
|
|
1418
1432
|
__export(RouterEvent_exports, {
|
|
1419
|
-
|
|
1433
|
+
from: () => from2,
|
|
1420
1434
|
types: () => types
|
|
1421
1435
|
});
|
|
1422
1436
|
var types = ["offer_created", "offer_matched", "offer_validation"];
|
|
1423
|
-
function
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
return `offer_created:${event.offer.hash.toLowerCase()}`;
|
|
1427
|
-
case "offer_matched":
|
|
1428
|
-
return `offer_matched:${event.offer.hash.toLowerCase()}`;
|
|
1429
|
-
case "offer_validation":
|
|
1430
|
-
return `offer_validation:${event.offer.hash.toLowerCase()}`;
|
|
1431
|
-
default: {
|
|
1432
|
-
throw new Error("Unhandled event type");
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1437
|
+
function from2(base) {
|
|
1438
|
+
const id = `${base.type}:${base.offer.hash.toLowerCase()}`;
|
|
1439
|
+
return { id, ...base };
|
|
1435
1440
|
}
|
|
1436
1441
|
|
|
1437
1442
|
// src/Validation.ts
|