@rhinestone/service-sdk 0.2.7 → 0.2.9
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/chains.d.ts.map +1 -1
- package/dist/chains.js +13 -8
- package/package.json +5 -1
package/dist/chains.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../src/chains.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../src/chains.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAY1D,KAAK,mBAAmB,GAAG,IAAI,CAC7B,YAAY,EACZ,oBAAoB,GAAG,eAAe,CACvC,CAAA;AAyGD,wBAAsB,eAAe,CACnC,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CAU3B"}
|
package/dist/chains.js
CHANGED
|
@@ -55,19 +55,21 @@ const FEE_CONFIG_OVERRIDES = {
|
|
|
55
55
|
// (eth_maxPriorityFeePerGas) under-prices the priority fee versus the real
|
|
56
56
|
// on-chain inclusion floor — the oracle reports the chain-min or zero while txs
|
|
57
57
|
// actually clear at a much higher tip. We keep viem's base estimate and lift
|
|
58
|
-
// only the tip to this absolute floor. Values measured live per chain
|
|
59
|
-
// RHI-4468 audit.
|
|
58
|
+
// only the tip to this absolute floor. Values measured live per chain (the
|
|
59
|
+
// RHI-4468 audit and subsequent fill-tracker probes; each entry dated).
|
|
60
60
|
const TIP_FLOOR_WEI = {
|
|
61
|
+
[chains_1.base.id]: 3000000n, // 0.003 gwei — oracle ~0.001 (network ~p25); real fills ~0.003-0.0036 (probed 2026-07-08)
|
|
61
62
|
[chains_1.polygon.id]: 45000000000n, // 45 gwei — Bor min 30 gwei x1.5; real p50 tip ~200 gwei
|
|
62
63
|
[chains_1.gnosis.id]: 1000000000n, // 1.0 gwei — viem oracle ~21 wei; real p90 inclusion ~1.0 gwei (re-probed 2026-06-25)
|
|
63
64
|
[chains_1.hyperEvm.id]: 150000000n, // 0.15 gwei — oracle returns 0; realized p50 tip ~0.15 gwei
|
|
64
65
|
[chains_1.monad.id]: 22000000000n, // 22 gwei — oracle 2 gwei; competitive tip p50/mode ~22 gwei
|
|
65
66
|
};
|
|
66
|
-
//
|
|
67
|
-
//
|
|
68
|
-
//
|
|
69
|
-
//
|
|
70
|
-
|
|
67
|
+
// Chains whose real tip drifts above the static floor in busy markets — also
|
|
68
|
+
// window the feeHistory tip and take the max with the floor. Polygon: real tip
|
|
69
|
+
// runs ~6.7x its oracle. Base: realized tip drifts above the floor while the
|
|
70
|
+
// oracle stays pinned — see TIP_FLOOR_WEI for the measured values. Both have
|
|
71
|
+
// stable base fees, so the base stays on viem's default.
|
|
72
|
+
const WINDOWED_TIP_CHAINS = new Set([chains_1.polygon.id, chains_1.base.id]);
|
|
71
73
|
const WINDOWED_TIP_HISTORY_BLOCKS = 20;
|
|
72
74
|
const WINDOWED_TIP_PERCENTILE = 50; // p50 per block, nearest-rank across the window
|
|
73
75
|
async function estimateGasFees(client, chainId) {
|
|
@@ -91,7 +93,10 @@ async function estimateViemFeesWithTipFloor(client, chainId, tipFloorWei) {
|
|
|
91
93
|
const oracleTip = fees.maxPriorityFeePerGas;
|
|
92
94
|
let tip = oracleTip;
|
|
93
95
|
if (WINDOWED_TIP_CHAINS.has(chainId)) {
|
|
94
|
-
|
|
96
|
+
// Best-effort: the windowed overlay refines the tip but must never turn a
|
|
97
|
+
// feeHistory outage into a quote outage — on failure, fall back to
|
|
98
|
+
// max(oracle, floor), which is exactly the pre-overlay pricing.
|
|
99
|
+
const windowedTip = await windowedFeeHistoryTip(client).catch(() => 0n);
|
|
95
100
|
if (windowedTip > tip)
|
|
96
101
|
tip = windowedTip;
|
|
97
102
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhinestone/service-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "Shared SDK for Rhinestone services",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rhinestone",
|
|
7
7
|
"url": "https://rhinestone.dev"
|
|
8
8
|
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/rhinestonewtf/service-sdk.git"
|
|
12
|
+
},
|
|
9
13
|
"publishConfig": {
|
|
10
14
|
"access": "public"
|
|
11
15
|
},
|