@across-protocol/sdk 3.4.5 → 3.4.6

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.
@@ -8,11 +8,11 @@ var utils_1 = require("../../utils");
8
8
  function eip1559(provider, opts) {
9
9
  var _a, _b, _c, _d, _e;
10
10
  return tslib_1.__awaiter(this, void 0, void 0, function () {
11
- var unsignedTx, baseFeeMultiplier, _f, baseFeePerGas, _priorityFeePerGas, priorityFeePerGas;
11
+ var unsignedTx, priorityFeeMultiplier, _f, baseFeePerGas, _priorityFeePerGas, priorityFeePerGas;
12
12
  return tslib_1.__generator(this, function (_g) {
13
13
  switch (_g.label) {
14
14
  case 0:
15
- unsignedTx = opts.unsignedTx, baseFeeMultiplier = opts.baseFeeMultiplier;
15
+ unsignedTx = opts.unsignedTx, priorityFeeMultiplier = opts.priorityFeeMultiplier;
16
16
  return [4, (0, linea_1.estimateGas)(provider, {
17
17
  account: (_a = unsignedTx === null || unsignedTx === void 0 ? void 0 : unsignedTx.from) !== null && _a !== void 0 ? _a : constants_1.DEFAULT_SIMULATED_RELAYER_ADDRESS,
18
18
  to: (_b = unsignedTx === null || unsignedTx === void 0 ? void 0 : unsignedTx.to) !== null && _b !== void 0 ? _b : constants_1.DEFAULT_SIMULATED_RELAYER_ADDRESS,
@@ -21,7 +21,7 @@ function eip1559(provider, opts) {
21
21
  })];
22
22
  case 1:
23
23
  _f = _g.sent(), baseFeePerGas = _f.baseFeePerGas, _priorityFeePerGas = _f.priorityFeePerGas;
24
- priorityFeePerGas = (_priorityFeePerGas * BigInt(baseFeeMultiplier.toString())) / BigInt(utils_1.fixedPointAdjustment.toString());
24
+ priorityFeePerGas = (_priorityFeePerGas * BigInt(priorityFeeMultiplier.toString())) / BigInt(utils_1.fixedPointAdjustment.toString());
25
25
  return [2, {
26
26
  maxFeePerGas: baseFeePerGas + priorityFeePerGas,
27
27
  maxPriorityFeePerGas: priorityFeePerGas,
@@ -1 +1 @@
1
- {"version":3,"file":"linea-viem.js","sourceRoot":"","sources":["../../../../src/gasPriceOracle/adapters/linea-viem.ts"],"names":[],"mappings":";;;;AACA,oCAAyC;AACzC,6CAA+E;AAG/E,qCAAmD;AAqBnD,SAAsB,OAAO,CAC3B,QAAsB,EACtB,IAA6B;;;;;;;oBAErB,UAAU,GAAwB,IAAI,WAA5B,EAAE,iBAAiB,GAAK,IAAI,kBAAT,CAAU;oBACkB,WAAM,IAAA,mBAAW,EAAC,QAAQ,EAAE;4BAC3F,OAAO,EAAE,MAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAgB,mCAAI,6CAAO;4BACjD,EAAE,EAAE,MAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,EAAc,mCAAI,6CAAO;4BAC1C,KAAK,EAAE,MAAM,CAAC,MAAA,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,0CAAE,QAAQ,EAAE,mCAAI,GAAG,CAAC;4BACnD,IAAI,EAAE,MAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAY,mCAAI,IAAI;yBACxC,CAAC,EAAA;;oBALI,KAA2D,SAK/D,EALM,aAAa,mBAAA,EAAqB,kBAAkB,uBAAA;oBAMtD,iBAAiB,GACrB,CAAC,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,4BAAoB,CAAC,QAAQ,EAAE,CAAC,CAAC;oBAExG,WAAO;4BACL,YAAY,EAAE,aAAa,GAAG,iBAAiB;4BAC/C,oBAAoB,EAAE,iBAAiB;yBACxC,EAAC;;;;CACH;AAlBD,0BAkBC"}
1
+ {"version":3,"file":"linea-viem.js","sourceRoot":"","sources":["../../../../src/gasPriceOracle/adapters/linea-viem.ts"],"names":[],"mappings":";;;;AACA,oCAAyC;AACzC,6CAA+E;AAG/E,qCAAmD;AAmBnD,SAAsB,OAAO,CAC3B,QAAsB,EACtB,IAA6B;;;;;;;oBAErB,UAAU,GAA4B,IAAI,WAAhC,EAAE,qBAAqB,GAAK,IAAI,sBAAT,CAAU;oBACc,WAAM,IAAA,mBAAW,EAAC,QAAQ,EAAE;4BAC3F,OAAO,EAAE,MAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAgB,mCAAI,6CAAO;4BACjD,EAAE,EAAE,MAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,EAAc,mCAAI,6CAAO;4BAC1C,KAAK,EAAE,MAAM,CAAC,MAAA,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,0CAAE,QAAQ,EAAE,mCAAI,GAAG,CAAC;4BACnD,IAAI,EAAE,MAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAY,mCAAI,IAAI;yBACxC,CAAC,EAAA;;oBALI,KAA2D,SAK/D,EALM,aAAa,mBAAA,EAAqB,kBAAkB,uBAAA;oBAMtD,iBAAiB,GACrB,CAAC,kBAAkB,GAAG,MAAM,CAAC,qBAAqB,CAAC,QAAQ,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,4BAAoB,CAAC,QAAQ,EAAE,CAAC,CAAC;oBAE5G,WAAO;4BACL,YAAY,EAAE,aAAa,GAAG,iBAAiB;4BAC/C,oBAAoB,EAAE,iBAAiB;yBACxC,EAAC;;;;CACH;AAlBD,0BAkBC"}
@@ -12,10 +12,8 @@ import { GasPriceEstimateOptions } from "../oracle";
12
12
  * to the priority fee.
13
13
  * @param provider Viem PublicClient
14
14
  * @param opts Relevant options for Linea are baseFeeMultiplier and unsignedTx.
15
- * @param baseFeeMultiplier Amount to multiply priority fee, since Linea's base fee is hardcoded while its priority
16
- * fee is dynamic.
17
- * @param priorityFeeMultiplier Unused in this function because the baseFeeMultiplier is applied to the dynamic
18
- * Linea priority fee while the base fee is hardcoded.
15
+ * @param baseFeeMultiplier Unused since Linea's base fee is hardcoded while its priority fee is dynamic.
16
+ * @param priorityFeeMultiplier Amount to multiply priority fee.
19
17
  * @param unsignedTx Should contain any params passed to linea_estimateGas, which are listed
20
18
  * here: https://docs.linea.build/api/reference/linea-estimategas#parameters
21
19
  * @returns
@@ -13,10 +13,8 @@ import { fixedPointAdjustment } from "../../utils";
13
13
  * to the priority fee.
14
14
  * @param provider Viem PublicClient
15
15
  * @param opts Relevant options for Linea are baseFeeMultiplier and unsignedTx.
16
- * @param baseFeeMultiplier Amount to multiply priority fee, since Linea's base fee is hardcoded while its priority
17
- * fee is dynamic.
18
- * @param priorityFeeMultiplier Unused in this function because the baseFeeMultiplier is applied to the dynamic
19
- * Linea priority fee while the base fee is hardcoded.
16
+ * @param baseFeeMultiplier Unused since Linea's base fee is hardcoded while its priority fee is dynamic.
17
+ * @param priorityFeeMultiplier Amount to multiply priority fee.
20
18
  * @param unsignedTx Should contain any params passed to linea_estimateGas, which are listed
21
19
  * here: https://docs.linea.build/api/reference/linea-estimategas#parameters
22
20
  * @returns
@@ -24,11 +22,11 @@ import { fixedPointAdjustment } from "../../utils";
24
22
  export function eip1559(provider, opts) {
25
23
  var _a, _b, _c, _d, _e;
26
24
  return __awaiter(this, void 0, void 0, function () {
27
- var unsignedTx, baseFeeMultiplier, _f, baseFeePerGas, _priorityFeePerGas, priorityFeePerGas;
25
+ var unsignedTx, priorityFeeMultiplier, _f, baseFeePerGas, _priorityFeePerGas, priorityFeePerGas;
28
26
  return __generator(this, function (_g) {
29
27
  switch (_g.label) {
30
28
  case 0:
31
- unsignedTx = opts.unsignedTx, baseFeeMultiplier = opts.baseFeeMultiplier;
29
+ unsignedTx = opts.unsignedTx, priorityFeeMultiplier = opts.priorityFeeMultiplier;
32
30
  return [4 /*yield*/, estimateGas(provider, {
33
31
  account: (_a = unsignedTx === null || unsignedTx === void 0 ? void 0 : unsignedTx.from) !== null && _a !== void 0 ? _a : account,
34
32
  to: (_b = unsignedTx === null || unsignedTx === void 0 ? void 0 : unsignedTx.to) !== null && _b !== void 0 ? _b : account,
@@ -37,7 +35,7 @@ export function eip1559(provider, opts) {
37
35
  })];
38
36
  case 1:
39
37
  _f = _g.sent(), baseFeePerGas = _f.baseFeePerGas, _priorityFeePerGas = _f.priorityFeePerGas;
40
- priorityFeePerGas = (_priorityFeePerGas * BigInt(baseFeeMultiplier.toString())) / BigInt(fixedPointAdjustment.toString());
38
+ priorityFeePerGas = (_priorityFeePerGas * BigInt(priorityFeeMultiplier.toString())) / BigInt(fixedPointAdjustment.toString());
41
39
  return [2 /*return*/, {
42
40
  maxFeePerGas: baseFeePerGas + priorityFeePerGas,
43
41
  maxPriorityFeePerGas: priorityFeePerGas,
@@ -1 +1 @@
1
- {"version":3,"file":"linea-viem.js","sourceRoot":"","sources":["../../../../src/gasPriceOracle/adapters/linea-viem.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,iCAAiC,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAgB,OAAO,CAC3B,QAAsB,EACtB,IAA6B;;;;;;;oBAErB,UAAU,GAAwB,IAAI,WAA5B,EAAE,iBAAiB,GAAK,IAAI,kBAAT,CAAU;oBACkB,qBAAM,WAAW,CAAC,QAAQ,EAAE;4BAC3F,OAAO,EAAE,MAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAgB,mCAAI,OAAO;4BACjD,EAAE,EAAE,MAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,EAAc,mCAAI,OAAO;4BAC1C,KAAK,EAAE,MAAM,CAAC,MAAA,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,0CAAE,QAAQ,EAAE,mCAAI,GAAG,CAAC;4BACnD,IAAI,EAAE,MAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAY,mCAAI,IAAI;yBACxC,CAAC,EA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B,uBAAA;oBAMtD,iBAAiB,GACrB,CAAC,kBAAkB,GAAG,MAAM,CAAC,qBAAqB,CAAC,QAAQ,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,oBAAoB,CAAC,QAAQ,EAAE,CAAC,CAAC;oBAE5G,sBAAO;4BACL,YAAY,EAAE,aAAa,GAAG,iBAAiB;4BAC/C,oBAAoB,EAAE,iBAAiB;yBACxC,EAAC;;;;CACH"}
@@ -12,10 +12,8 @@ import { GasPriceEstimateOptions } from "../oracle";
12
12
  * to the priority fee.
13
13
  * @param provider Viem PublicClient
14
14
  * @param opts Relevant options for Linea are baseFeeMultiplier and unsignedTx.
15
- * @param baseFeeMultiplier Amount to multiply priority fee, since Linea's base fee is hardcoded while its priority
16
- * fee is dynamic.
17
- * @param priorityFeeMultiplier Unused in this function because the baseFeeMultiplier is applied to the dynamic
18
- * Linea priority fee while the base fee is hardcoded.
15
+ * @param baseFeeMultiplier Unused since Linea's base fee is hardcoded while its priority fee is dynamic.
16
+ * @param priorityFeeMultiplier Amount to multiply priority fee.
19
17
  * @param unsignedTx Should contain any params passed to linea_estimateGas, which are listed
20
18
  * here: https://docs.linea.build/api/reference/linea-estimategas#parameters
21
19
  * @returns
@@ -1 +1 @@
1
- {"version":3,"file":"linea-viem.d.ts","sourceRoot":"","sources":["../../../../src/gasPriceOracle/adapters/linea-viem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,YAAY,EAAE,MAAM,MAAM,CAAC;AAGlD,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAGpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,OAAO,CAC3B,QAAQ,EAAE,YAAY,EACtB,IAAI,EAAE,uBAAuB,GAC5B,OAAO,CAAC,wBAAwB,CAAC,CAenC"}
1
+ {"version":3,"file":"linea-viem.d.ts","sourceRoot":"","sources":["../../../../src/gasPriceOracle/adapters/linea-viem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,YAAY,EAAE,MAAM,MAAM,CAAC;AAGlD,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAGpD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,OAAO,CAC3B,QAAQ,EAAE,YAAY,EACtB,IAAI,EAAE,uBAAuB,GAC5B,OAAO,CAAC,wBAAwB,CAAC,CAenC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@across-protocol/sdk",
3
3
  "author": "UMA Team",
4
- "version": "3.4.5",
4
+ "version": "3.4.6",
5
5
  "license": "AGPL-3.0",
6
6
  "homepage": "https://docs.across.to/reference/sdk",
7
7
  "files": [
@@ -16,10 +16,8 @@ import { fixedPointAdjustment } from "../../utils";
16
16
  * to the priority fee.
17
17
  * @param provider Viem PublicClient
18
18
  * @param opts Relevant options for Linea are baseFeeMultiplier and unsignedTx.
19
- * @param baseFeeMultiplier Amount to multiply priority fee, since Linea's base fee is hardcoded while its priority
20
- * fee is dynamic.
21
- * @param priorityFeeMultiplier Unused in this function because the baseFeeMultiplier is applied to the dynamic
22
- * Linea priority fee while the base fee is hardcoded.
19
+ * @param baseFeeMultiplier Unused since Linea's base fee is hardcoded while its priority fee is dynamic.
20
+ * @param priorityFeeMultiplier Amount to multiply priority fee.
23
21
  * @param unsignedTx Should contain any params passed to linea_estimateGas, which are listed
24
22
  * here: https://docs.linea.build/api/reference/linea-estimategas#parameters
25
23
  * @returns
@@ -28,7 +26,7 @@ export async function eip1559(
28
26
  provider: PublicClient,
29
27
  opts: GasPriceEstimateOptions
30
28
  ): Promise<InternalGasPriceEstimate> {
31
- const { unsignedTx, baseFeeMultiplier } = opts;
29
+ const { unsignedTx, priorityFeeMultiplier } = opts;
32
30
  const { baseFeePerGas, priorityFeePerGas: _priorityFeePerGas } = await estimateGas(provider, {
33
31
  account: (unsignedTx?.from as Address) ?? account,
34
32
  to: (unsignedTx?.to as Address) ?? account,
@@ -36,7 +34,7 @@ export async function eip1559(
36
34
  data: (unsignedTx?.data as Hex) ?? "0x",
37
35
  });
38
36
  const priorityFeePerGas =
39
- (_priorityFeePerGas * BigInt(baseFeeMultiplier.toString())) / BigInt(fixedPointAdjustment.toString());
37
+ (_priorityFeePerGas * BigInt(priorityFeeMultiplier.toString())) / BigInt(fixedPointAdjustment.toString());
40
38
 
41
39
  return {
42
40
  maxFeePerGas: baseFeePerGas + priorityFeePerGas,