@across-protocol/sdk 3.3.31 → 3.4.0
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/cjs/clients/BundleDataClient/BundleDataClient.js +8 -2
- package/dist/cjs/clients/BundleDataClient/BundleDataClient.js.map +1 -1
- package/dist/cjs/clients/BundleDataClient/utils/SuperstructUtils.d.ts +10 -10
- package/dist/cjs/gasPriceOracle/adapters/arbitrum.d.ts +2 -1
- package/dist/cjs/gasPriceOracle/adapters/arbitrum.js +2 -2
- package/dist/cjs/gasPriceOracle/adapters/arbitrum.js.map +1 -1
- package/dist/cjs/gasPriceOracle/adapters/ethereum.d.ts +6 -4
- package/dist/cjs/gasPriceOracle/adapters/ethereum.js +21 -13
- package/dist/cjs/gasPriceOracle/adapters/ethereum.js.map +1 -1
- package/dist/cjs/gasPriceOracle/adapters/linea-viem.d.ts +2 -1
- package/dist/cjs/gasPriceOracle/adapters/linea-viem.js +16 -10
- package/dist/cjs/gasPriceOracle/adapters/linea-viem.js.map +1 -1
- package/dist/cjs/gasPriceOracle/adapters/linea.d.ts +2 -1
- package/dist/cjs/gasPriceOracle/adapters/linea.js +2 -2
- package/dist/cjs/gasPriceOracle/adapters/linea.js.map +1 -1
- package/dist/cjs/gasPriceOracle/adapters/polygon.d.ts +21 -1
- package/dist/cjs/gasPriceOracle/adapters/polygon.js +45 -5
- package/dist/cjs/gasPriceOracle/adapters/polygon.js.map +1 -1
- package/dist/cjs/gasPriceOracle/oracle.d.ts +11 -3
- package/dist/cjs/gasPriceOracle/oracle.js +29 -27
- package/dist/cjs/gasPriceOracle/oracle.js.map +1 -1
- package/dist/cjs/providers/types.d.ts +3 -3
- package/dist/cjs/relayFeeCalculator/chain-queries/alephZero.d.ts +0 -229
- package/dist/cjs/relayFeeCalculator/chain-queries/alephZero.js +2 -12
- package/dist/cjs/relayFeeCalculator/chain-queries/alephZero.js.map +1 -1
- package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.d.ts +10 -5
- package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.js +55 -11
- package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.js.map +1 -1
- package/dist/cjs/relayFeeCalculator/chain-queries/factory.d.ts +1 -1
- package/dist/cjs/relayFeeCalculator/chain-queries/factory.js +4 -5
- package/dist/cjs/relayFeeCalculator/chain-queries/factory.js.map +1 -1
- package/dist/cjs/relayFeeCalculator/chain-queries/polygon.d.ts +0 -229
- package/dist/cjs/relayFeeCalculator/chain-queries/polygon.js +2 -12
- package/dist/cjs/relayFeeCalculator/chain-queries/polygon.js.map +1 -1
- package/dist/cjs/relayFeeCalculator/relayFeeCalculator.d.ts +1 -1
- package/dist/cjs/relayFeeCalculator/relayFeeCalculator.js.map +1 -1
- package/dist/cjs/utils/DepositUtils.d.ts +1 -0
- package/dist/cjs/utils/DepositUtils.js +5 -1
- package/dist/cjs/utils/DepositUtils.js.map +1 -1
- package/dist/cjs/utils/Multicall.js +0 -5
- package/dist/cjs/utils/Multicall.js.map +1 -1
- package/dist/cjs/utils/common.d.ts +1 -8
- package/dist/cjs/utils/common.js +1 -83
- package/dist/cjs/utils/common.js.map +1 -1
- package/dist/esm/clients/BundleDataClient/BundleDataClient.js +16 -3
- package/dist/esm/clients/BundleDataClient/BundleDataClient.js.map +1 -1
- package/dist/esm/clients/BundleDataClient/utils/SuperstructUtils.d.ts +10 -10
- package/dist/esm/gasPriceOracle/adapters/arbitrum.d.ts +10 -1
- package/dist/esm/gasPriceOracle/adapters/arbitrum.js +10 -4
- package/dist/esm/gasPriceOracle/adapters/arbitrum.js.map +1 -1
- package/dist/esm/gasPriceOracle/adapters/ethereum.d.ts +19 -6
- package/dist/esm/gasPriceOracle/adapters/ethereum.js +38 -16
- package/dist/esm/gasPriceOracle/adapters/ethereum.js.map +1 -1
- package/dist/esm/gasPriceOracle/adapters/linea-viem.d.ts +19 -1
- package/dist/esm/gasPriceOracle/adapters/linea-viem.js +33 -10
- package/dist/esm/gasPriceOracle/adapters/linea-viem.js.map +1 -1
- package/dist/esm/gasPriceOracle/adapters/linea.d.ts +2 -1
- package/dist/esm/gasPriceOracle/adapters/linea.js +6 -2
- package/dist/esm/gasPriceOracle/adapters/linea.js.map +1 -1
- package/dist/esm/gasPriceOracle/adapters/polygon.d.ts +27 -1
- package/dist/esm/gasPriceOracle/adapters/polygon.js +49 -5
- package/dist/esm/gasPriceOracle/adapters/polygon.js.map +1 -1
- package/dist/esm/gasPriceOracle/oracle.d.ts +16 -8
- package/dist/esm/gasPriceOracle/oracle.js +35 -33
- package/dist/esm/gasPriceOracle/oracle.js.map +1 -1
- package/dist/esm/providers/types.d.ts +3 -3
- package/dist/esm/relayFeeCalculator/chain-queries/alephZero.d.ts +0 -229
- package/dist/esm/relayFeeCalculator/chain-queries/alephZero.js +3 -13
- package/dist/esm/relayFeeCalculator/chain-queries/alephZero.js.map +1 -1
- package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.d.ts +21 -7
- package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.js +68 -15
- package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.js.map +1 -1
- package/dist/esm/relayFeeCalculator/chain-queries/factory.d.ts +1 -1
- package/dist/esm/relayFeeCalculator/chain-queries/factory.js +4 -5
- package/dist/esm/relayFeeCalculator/chain-queries/factory.js.map +1 -1
- package/dist/esm/relayFeeCalculator/chain-queries/polygon.d.ts +0 -229
- package/dist/esm/relayFeeCalculator/chain-queries/polygon.js +3 -13
- package/dist/esm/relayFeeCalculator/chain-queries/polygon.js.map +1 -1
- package/dist/esm/relayFeeCalculator/relayFeeCalculator.d.ts +1 -1
- package/dist/esm/relayFeeCalculator/relayFeeCalculator.js.map +1 -1
- package/dist/esm/utils/DepositUtils.d.ts +9 -0
- package/dist/esm/utils/DepositUtils.js +11 -0
- package/dist/esm/utils/DepositUtils.js.map +1 -1
- package/dist/esm/utils/Multicall.js +1 -6
- package/dist/esm/utils/Multicall.js.map +1 -1
- package/dist/esm/utils/common.d.ts +1 -19
- package/dist/esm/utils/common.js +3 -95
- package/dist/esm/utils/common.js.map +1 -1
- package/dist/types/clients/BundleDataClient/BundleDataClient.d.ts.map +1 -1
- package/dist/types/clients/BundleDataClient/utils/SuperstructUtils.d.ts +10 -10
- package/dist/types/gasPriceOracle/adapters/arbitrum.d.ts +10 -1
- package/dist/types/gasPriceOracle/adapters/arbitrum.d.ts.map +1 -1
- package/dist/types/gasPriceOracle/adapters/ethereum.d.ts +19 -6
- package/dist/types/gasPriceOracle/adapters/ethereum.d.ts.map +1 -1
- package/dist/types/gasPriceOracle/adapters/linea-viem.d.ts +19 -1
- package/dist/types/gasPriceOracle/adapters/linea-viem.d.ts.map +1 -1
- package/dist/types/gasPriceOracle/adapters/linea.d.ts +2 -1
- package/dist/types/gasPriceOracle/adapters/linea.d.ts.map +1 -1
- package/dist/types/gasPriceOracle/adapters/polygon.d.ts +27 -1
- package/dist/types/gasPriceOracle/adapters/polygon.d.ts.map +1 -1
- package/dist/types/gasPriceOracle/oracle.d.ts +16 -8
- package/dist/types/gasPriceOracle/oracle.d.ts.map +1 -1
- package/dist/types/providers/types.d.ts +3 -3
- package/dist/types/relayFeeCalculator/chain-queries/alephZero.d.ts +0 -229
- package/dist/types/relayFeeCalculator/chain-queries/alephZero.d.ts.map +1 -1
- package/dist/types/relayFeeCalculator/chain-queries/baseQuery.d.ts +21 -7
- package/dist/types/relayFeeCalculator/chain-queries/baseQuery.d.ts.map +1 -1
- package/dist/types/relayFeeCalculator/chain-queries/factory.d.ts +1 -1
- package/dist/types/relayFeeCalculator/chain-queries/factory.d.ts.map +1 -1
- package/dist/types/relayFeeCalculator/chain-queries/polygon.d.ts +0 -229
- package/dist/types/relayFeeCalculator/chain-queries/polygon.d.ts.map +1 -1
- package/dist/types/relayFeeCalculator/relayFeeCalculator.d.ts +1 -1
- package/dist/types/relayFeeCalculator/relayFeeCalculator.d.ts.map +1 -1
- package/dist/types/utils/DepositUtils.d.ts +9 -0
- package/dist/types/utils/DepositUtils.d.ts.map +1 -1
- package/dist/types/utils/Multicall.d.ts.map +1 -1
- package/dist/types/utils/common.d.ts +1 -19
- package/dist/types/utils/common.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/clients/BundleDataClient/BundleDataClient.ts +17 -2
- package/src/gasPriceOracle/adapters/arbitrum.ts +13 -6
- package/src/gasPriceOracle/adapters/ethereum.ts +43 -12
- package/src/gasPriceOracle/adapters/linea-viem.ts +32 -6
- package/src/gasPriceOracle/adapters/linea.ts +7 -2
- package/src/gasPriceOracle/adapters/polygon.ts +46 -5
- package/src/gasPriceOracle/oracle.ts +53 -28
- package/src/relayFeeCalculator/chain-queries/alephZero.ts +1 -29
- package/src/relayFeeCalculator/chain-queries/baseQuery.ts +73 -20
- package/src/relayFeeCalculator/chain-queries/factory.ts +6 -6
- package/src/relayFeeCalculator/chain-queries/polygon.ts +1 -29
- package/src/relayFeeCalculator/relayFeeCalculator.ts +6 -1
- package/src/utils/DepositUtils.ts +12 -0
- package/src/utils/Multicall.ts +1 -6
- package/src/utils/common.ts +2 -92
- package/dist/cjs/gasPriceOracle/adapters/arbitrum-viem.d.ts +0 -3
- package/dist/cjs/gasPriceOracle/adapters/arbitrum-viem.js +0 -21
- package/dist/cjs/gasPriceOracle/adapters/arbitrum-viem.js.map +0 -1
- package/dist/cjs/gasPriceOracle/adapters/ethereum-viem.d.ts +0 -4
- package/dist/cjs/gasPriceOracle/adapters/ethereum-viem.js +0 -26
- package/dist/cjs/gasPriceOracle/adapters/ethereum-viem.js.map +0 -1
- package/dist/cjs/gasPriceOracle/adapters/polygon-viem.d.ts +0 -3
- package/dist/cjs/gasPriceOracle/adapters/polygon-viem.js +0 -84
- package/dist/cjs/gasPriceOracle/adapters/polygon-viem.js.map +0 -1
- package/dist/cjs/package.json +0 -1
- package/dist/esm/gasPriceOracle/adapters/arbitrum-viem.d.ts +0 -3
- package/dist/esm/gasPriceOracle/adapters/arbitrum-viem.js +0 -20
- package/dist/esm/gasPriceOracle/adapters/arbitrum-viem.js.map +0 -1
- package/dist/esm/gasPriceOracle/adapters/ethereum-viem.d.ts +0 -4
- package/dist/esm/gasPriceOracle/adapters/ethereum-viem.js +0 -21
- package/dist/esm/gasPriceOracle/adapters/ethereum-viem.js.map +0 -1
- package/dist/esm/gasPriceOracle/adapters/polygon-viem.d.ts +0 -3
- package/dist/esm/gasPriceOracle/adapters/polygon-viem.js +0 -82
- package/dist/esm/gasPriceOracle/adapters/polygon-viem.js.map +0 -1
- package/dist/esm/package.json +0 -1
- package/dist/types/gasPriceOracle/adapters/arbitrum-viem.d.ts +0 -4
- package/dist/types/gasPriceOracle/adapters/arbitrum-viem.d.ts.map +0 -1
- package/dist/types/gasPriceOracle/adapters/ethereum-viem.d.ts +0 -5
- package/dist/types/gasPriceOracle/adapters/ethereum-viem.d.ts.map +0 -1
- package/dist/types/gasPriceOracle/adapters/polygon-viem.d.ts +0 -4
- package/dist/types/gasPriceOracle/adapters/polygon-viem.d.ts.map +0 -1
- package/src/gasPriceOracle/adapters/arbitrum-viem.ts +0 -13
- package/src/gasPriceOracle/adapters/ethereum-viem.ts +0 -19
- package/src/gasPriceOracle/adapters/polygon-viem.ts +0 -86
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polygon.js","sourceRoot":"","sources":["../../../../src/gasPriceOracle/adapters/polygon.ts"],"names":[],"mappings":";;;;AACA,sEAA8F;AAC9F,
|
|
1
|
+
{"version":3,"file":"polygon.js","sourceRoot":"","sources":["../../../../src/gasPriceOracle/adapters/polygon.ts"],"names":[],"mappings":";;;;AACA,sEAA8F;AAC9F,qCAA6F;AAC7F,6CAA4C;AAE5C,gCAAwC;AACxC,uCAAqC;AAsB7B,IAAA,OAAO,GAAK,qBAAS,QAAd,CAAe;AAE9B;IAAuC,6CAAe;IAGpD,2BAAY,EAA6E;QAAzF,iBAKC;YALW,qBAA2E,EAAE,KAAA,EAA3E,eAAiB,EAAjB,OAAO,mBAAG,OAAO,KAAA,EAAE,IAA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c,CAAC,EAAE;wBACrC,aAAa,GAAG,cAAc,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;wBAC/D,oBAAoB,GAAG,cAAc,CAAC;wBACtC,YAAY,GAAG,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;qBAChD;;wBAGH,WAAO,EAAE,oBAAoB,sBAAA,EAAE,YAAY,cAAA,EAAE,EAAC;;;;CAC/C;AArCD,gCAqCC"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { Transport } from "viem";
|
|
2
|
-
import { providers } from "ethers";
|
|
2
|
+
import { PopulatedTransaction, providers } from "ethers";
|
|
3
|
+
import { BigNumber } from "../utils";
|
|
3
4
|
import { GasPriceEstimate } from "./types";
|
|
4
|
-
export
|
|
5
|
-
|
|
5
|
+
export interface GasPriceEstimateOptions {
|
|
6
|
+
baseFeeMultiplier: BigNumber;
|
|
7
|
+
legacyFallback: boolean;
|
|
8
|
+
chainId: number;
|
|
9
|
+
unsignedTx?: PopulatedTransaction;
|
|
10
|
+
transport?: Transport;
|
|
11
|
+
}
|
|
12
|
+
export declare function getGasPriceEstimate(provider: providers.Provider, opts?: Partial<GasPriceEstimateOptions>): Promise<GasPriceEstimate>;
|
|
13
|
+
export declare function _getViemGasPriceEstimate(providerOrChainId: providers.Provider | number, opts: GasPriceEstimateOptions): Promise<GasPriceEstimate>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports._getViemGasPriceEstimate = exports.getGasPriceEstimate = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var assert_1 = tslib_1.__importDefault(require("assert"));
|
|
6
6
|
var constants_1 = require("../constants");
|
|
@@ -10,38 +10,42 @@ var arbitrum = tslib_1.__importStar(require("./adapters/arbitrum"));
|
|
|
10
10
|
var ethereum = tslib_1.__importStar(require("./adapters/ethereum"));
|
|
11
11
|
var linea = tslib_1.__importStar(require("./adapters/linea"));
|
|
12
12
|
var polygon = tslib_1.__importStar(require("./adapters/polygon"));
|
|
13
|
-
var arbitrumViem = tslib_1.__importStar(require("./adapters/arbitrum-viem"));
|
|
14
13
|
var lineaViem = tslib_1.__importStar(require("./adapters/linea-viem"));
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
var GAS_PRICE_ESTIMATE_DEFAULTS = {
|
|
15
|
+
legacyFallback: true,
|
|
16
|
+
};
|
|
17
|
+
function getGasPriceEstimate(provider, opts) {
|
|
18
|
+
var _a, _b;
|
|
19
|
+
if (opts === void 0) { opts = {}; }
|
|
18
20
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
switch (_c.label) {
|
|
21
|
+
var baseFeeMultiplier, chainId, _c, optsWithDefaults, useViem;
|
|
22
|
+
return tslib_1.__generator(this, function (_d) {
|
|
23
|
+
switch (_d.label) {
|
|
23
24
|
case 0:
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
baseFeeMultiplier = (_a = opts.baseFeeMultiplier) !== null && _a !== void 0 ? _a : (0, utils_1.toBNWei)("1");
|
|
26
|
+
(0, assert_1.default)(baseFeeMultiplier.gte((0, utils_1.toBNWei)("1.0")) && baseFeeMultiplier.lte((0, utils_1.toBNWei)("5")), "Require 1.0 < base fee multiplier (".concat(baseFeeMultiplier, ") <= 5.0 for a total gas multiplier within [+1.0, +5.0]"));
|
|
27
|
+
if (!((_b = opts.chainId) !== null && _b !== void 0)) return [3, 1];
|
|
28
|
+
_c = _b;
|
|
26
29
|
return [3, 3];
|
|
27
30
|
case 1: return [4, provider.getNetwork()];
|
|
28
31
|
case 2:
|
|
29
|
-
|
|
30
|
-
|
|
32
|
+
_c = (_d.sent()).chainId;
|
|
33
|
+
_d.label = 3;
|
|
31
34
|
case 3:
|
|
32
|
-
|
|
35
|
+
chainId = _c;
|
|
36
|
+
optsWithDefaults = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, GAS_PRICE_ESTIMATE_DEFAULTS), { baseFeeMultiplier: baseFeeMultiplier }), opts), { chainId: chainId });
|
|
33
37
|
useViem = process.env["NEW_GAS_PRICE_ORACLE_".concat(chainId)] === "true";
|
|
34
38
|
return [2, useViem
|
|
35
|
-
?
|
|
36
|
-
:
|
|
39
|
+
? _getViemGasPriceEstimate(chainId, optsWithDefaults)
|
|
40
|
+
: _getEthersGasPriceEstimate(provider, optsWithDefaults)];
|
|
37
41
|
}
|
|
38
42
|
});
|
|
39
43
|
});
|
|
40
44
|
}
|
|
41
45
|
exports.getGasPriceEstimate = getGasPriceEstimate;
|
|
42
|
-
function
|
|
46
|
+
function _getEthersGasPriceEstimate(provider, opts) {
|
|
43
47
|
var _a;
|
|
44
|
-
|
|
48
|
+
var chainId = opts.chainId, legacyFallback = opts.legacyFallback;
|
|
45
49
|
var gasPriceFeeds = (_a = {},
|
|
46
50
|
_a[constants_1.CHAIN_IDs.ALEPH_ZERO] = arbitrum.eip1559,
|
|
47
51
|
_a[constants_1.CHAIN_IDs.ARBITRUM] = arbitrum.eip1559,
|
|
@@ -54,15 +58,16 @@ function getEthersGasPriceEstimate(provider, chainId, legacyFallback) {
|
|
|
54
58
|
var gasPriceFeed = gasPriceFeeds[chainId];
|
|
55
59
|
(0, assert_1.default)(gasPriceFeed || legacyFallback, "No suitable gas price oracle for Chain ID ".concat(chainId));
|
|
56
60
|
gasPriceFeed !== null && gasPriceFeed !== void 0 ? gasPriceFeed : (gasPriceFeed = (0, utils_1.chainIsOPStack)(chainId) ? ethereum.eip1559 : ethereum.legacy);
|
|
57
|
-
return gasPriceFeed(provider,
|
|
61
|
+
return gasPriceFeed(provider, opts);
|
|
58
62
|
}
|
|
59
|
-
function
|
|
63
|
+
function _getViemGasPriceEstimate(providerOrChainId, opts) {
|
|
60
64
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
61
|
-
var chainId, _a, viemProvider, gasPriceFeeds, maxFeePerGas, maxPriorityFeePerGas, gasPrice;
|
|
65
|
+
var baseFeeMultiplier, transport, chainId, _a, viemProvider, gasPriceFeeds, maxFeePerGas, maxPriorityFeePerGas, gasPrice;
|
|
62
66
|
var _b, _c, _d;
|
|
63
67
|
return tslib_1.__generator(this, function (_e) {
|
|
64
68
|
switch (_e.label) {
|
|
65
69
|
case 0:
|
|
70
|
+
baseFeeMultiplier = opts.baseFeeMultiplier, transport = opts.transport;
|
|
66
71
|
if (!(typeof providerOrChainId === "number")) return [3, 1];
|
|
67
72
|
_a = providerOrChainId;
|
|
68
73
|
return [3, 3];
|
|
@@ -74,13 +79,10 @@ function getViemGasPriceEstimate(providerOrChainId, transport) {
|
|
|
74
79
|
chainId = _a;
|
|
75
80
|
viemProvider = (0, util_1.getPublicClient)(chainId, transport);
|
|
76
81
|
gasPriceFeeds = (_b = {},
|
|
77
|
-
_b[constants_1.CHAIN_IDs.ALEPH_ZERO] = arbitrumViem.eip1559,
|
|
78
|
-
_b[constants_1.CHAIN_IDs.ARBITRUM] = arbitrumViem.eip1559,
|
|
79
82
|
_b[constants_1.CHAIN_IDs.LINEA] = lineaViem.eip1559,
|
|
80
|
-
_b[constants_1.CHAIN_IDs.POLYGON] = polygonViem.gasStation,
|
|
81
83
|
_b);
|
|
82
84
|
if (!gasPriceFeeds[chainId]) return [3, 5];
|
|
83
|
-
return [4, gasPriceFeeds[chainId](viemProvider,
|
|
85
|
+
return [4, gasPriceFeeds[chainId](viemProvider, opts)];
|
|
84
86
|
case 4:
|
|
85
87
|
(_c = _e.sent(), maxFeePerGas = _c.maxFeePerGas, maxPriorityFeePerGas = _c.maxPriorityFeePerGas);
|
|
86
88
|
return [3, 7];
|
|
@@ -89,7 +91,7 @@ function getViemGasPriceEstimate(providerOrChainId, transport) {
|
|
|
89
91
|
return [4, viemProvider.estimateFeesPerGas()];
|
|
90
92
|
case 6:
|
|
91
93
|
(_d = _e.sent(), maxFeePerGas = _d.maxFeePerGas, maxPriorityFeePerGas = _d.maxPriorityFeePerGas, gasPrice = _d.gasPrice);
|
|
92
|
-
maxFeePerGas !== null && maxFeePerGas !== void 0 ? maxFeePerGas : (maxFeePerGas = gasPrice);
|
|
94
|
+
maxFeePerGas !== null && maxFeePerGas !== void 0 ? maxFeePerGas : (maxFeePerGas = (gasPrice * BigInt(baseFeeMultiplier.toString())) / BigInt(utils_1.fixedPointAdjustment.toString()));
|
|
93
95
|
maxPriorityFeePerGas !== null && maxPriorityFeePerGas !== void 0 ? maxPriorityFeePerGas : (maxPriorityFeePerGas = BigInt(0));
|
|
94
96
|
_e.label = 7;
|
|
95
97
|
case 7: return [2, {
|
|
@@ -100,5 +102,5 @@ function getViemGasPriceEstimate(providerOrChainId, transport) {
|
|
|
100
102
|
});
|
|
101
103
|
});
|
|
102
104
|
}
|
|
103
|
-
exports.
|
|
105
|
+
exports._getViemGasPriceEstimate = _getViemGasPriceEstimate;
|
|
104
106
|
//# sourceMappingURL=oracle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oracle.js","sourceRoot":"","sources":["../../../src/gasPriceOracle/oracle.ts"],"names":[],"mappings":";;;;AAAA,0DAA4B;AAG5B,0CAAyC;AACzC,
|
|
1
|
+
{"version":3,"file":"oracle.js","sourceRoot":"","sources":["../../../src/gasPriceOracle/oracle.ts"],"names":[],"mappings":";;;;AAAA,0DAA4B;AAG5B,0CAAyC;AACzC,kCAAoF;AAEpF,+BAAyC;AACzC,oEAAgD;AAChD,oEAAgD;AAChD,8DAA0C;AAC1C,kEAA8C;AAC9C,uEAAmD;AAenD,IAAM,2BAA2B,GAAG;IAClC,cAAc,EAAE,IAAI;CACrB,CAAC;AAQF,SAAsB,mBAAmB,CACvC,QAA4B,EAC5B,IAA2C;;IAA3C,qBAAA,EAAA,SAA2C;;;;;;oBAErC,iBAAiB,GAAG,MAAA,IAAI,CAAC,iBAAiB,mCAAI,IAAA,eAAO,EAAC,GAAG,CAAC,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xF,YAAY,kBAAA,EAAE,oBAAoB,0BAAA,EAAE,QAAQ,cAAA,CAA6C,CAAC;oBAE7F,YAAY,aAAZ,YAAY,cAAZ,YAAY,IAAZ,YAAY,GAAK,CAAC,QAAS,GAAG,MAAM,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,4BAAoB,CAAC,QAAQ,EAAE,CAAC,EAAC;oBAC9G,oBAAoB,aAApB,oBAAoB,cAApB,oBAAoB,IAApB,oBAAoB,GAAK,MAAM,CAAC,CAAC,CAAC,EAAC;;wBAGrC,WAAO;wBACL,YAAY,EAAE,iBAAS,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;wBACrD,oBAAoB,EAAE,iBAAS,CAAC,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE,CAAC;qBACtE,EAAC;;;;CACH;AA9BD,4DA8BC"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export type RPCProvider = "ALCHEMY" | "DRPC" | "INFURA" | "INFURA_DIN";
|
|
2
2
|
export type RPCTransport = "https" | "wss";
|
|
3
3
|
export declare const JsonRpcError: import("superstruct").Struct<{
|
|
4
|
-
id: string | number;
|
|
5
4
|
error: {
|
|
6
|
-
code: number;
|
|
7
5
|
message: string;
|
|
6
|
+
code: number;
|
|
8
7
|
data?: any;
|
|
9
8
|
};
|
|
9
|
+
id: string | number;
|
|
10
10
|
jsonrpc: "2.0";
|
|
11
11
|
}, {
|
|
12
12
|
jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
|
|
13
13
|
id: import("superstruct").Struct<string | number, null>;
|
|
14
14
|
error: import("superstruct").Struct<{
|
|
15
|
-
code: number;
|
|
16
15
|
message: string;
|
|
16
|
+
code: number;
|
|
17
17
|
data?: any;
|
|
18
18
|
}, {
|
|
19
19
|
code: import("superstruct").Struct<number, null>;
|
|
@@ -1,233 +1,4 @@
|
|
|
1
|
-
import { Logger } from "../relayFeeCalculator";
|
|
2
|
-
import { providers } from "ethers";
|
|
3
1
|
import { QueryBase } from "./baseQuery";
|
|
4
2
|
export declare class AlephZeroQueries extends QueryBase {
|
|
5
|
-
constructor(provider: providers.Provider, symbolMapping?: {
|
|
6
|
-
ACX: {
|
|
7
|
-
name: string;
|
|
8
|
-
symbol: string;
|
|
9
|
-
decimals: number;
|
|
10
|
-
addresses: {
|
|
11
|
-
[x: number]: string;
|
|
12
|
-
};
|
|
13
|
-
coingeckoId: string;
|
|
14
|
-
};
|
|
15
|
-
ARB: {
|
|
16
|
-
name: string;
|
|
17
|
-
symbol: string;
|
|
18
|
-
decimals: number;
|
|
19
|
-
addresses: {
|
|
20
|
-
[x: number]: string;
|
|
21
|
-
};
|
|
22
|
-
coingeckoId: string;
|
|
23
|
-
};
|
|
24
|
-
AZERO: {
|
|
25
|
-
name: string;
|
|
26
|
-
symbol: string;
|
|
27
|
-
decimals: number;
|
|
28
|
-
addresses: {
|
|
29
|
-
[x: number]: string;
|
|
30
|
-
};
|
|
31
|
-
coingeckoId: string;
|
|
32
|
-
};
|
|
33
|
-
BAL: {
|
|
34
|
-
name: string;
|
|
35
|
-
symbol: string;
|
|
36
|
-
decimals: number;
|
|
37
|
-
addresses: {
|
|
38
|
-
[x: number]: string;
|
|
39
|
-
};
|
|
40
|
-
coingeckoId: string;
|
|
41
|
-
};
|
|
42
|
-
BADGER: {
|
|
43
|
-
name: string;
|
|
44
|
-
symbol: string;
|
|
45
|
-
decimals: number;
|
|
46
|
-
addresses: {
|
|
47
|
-
[x: number]: string;
|
|
48
|
-
};
|
|
49
|
-
coingeckoId: string;
|
|
50
|
-
};
|
|
51
|
-
BOBA: {
|
|
52
|
-
name: string;
|
|
53
|
-
symbol: string;
|
|
54
|
-
decimals: number;
|
|
55
|
-
addresses: {
|
|
56
|
-
[x: number]: string;
|
|
57
|
-
};
|
|
58
|
-
coingeckoId: string;
|
|
59
|
-
};
|
|
60
|
-
DAI: {
|
|
61
|
-
name: string;
|
|
62
|
-
symbol: string;
|
|
63
|
-
decimals: number;
|
|
64
|
-
addresses: {
|
|
65
|
-
[x: number]: string;
|
|
66
|
-
};
|
|
67
|
-
coingeckoId: string;
|
|
68
|
-
};
|
|
69
|
-
ETH: {
|
|
70
|
-
name: string;
|
|
71
|
-
symbol: string;
|
|
72
|
-
decimals: number;
|
|
73
|
-
addresses: {
|
|
74
|
-
[x: number]: string;
|
|
75
|
-
};
|
|
76
|
-
coingeckoId: string;
|
|
77
|
-
};
|
|
78
|
-
GHO: {
|
|
79
|
-
name: string;
|
|
80
|
-
symbol: string;
|
|
81
|
-
decimals: number;
|
|
82
|
-
addresses: {
|
|
83
|
-
[x: number]: string;
|
|
84
|
-
};
|
|
85
|
-
coingeckoId: string;
|
|
86
|
-
};
|
|
87
|
-
LSK: {
|
|
88
|
-
name: string;
|
|
89
|
-
symbol: string;
|
|
90
|
-
decimals: number;
|
|
91
|
-
addresses: {
|
|
92
|
-
[x: number]: string;
|
|
93
|
-
};
|
|
94
|
-
coingeckoId: string;
|
|
95
|
-
};
|
|
96
|
-
MATIC: {
|
|
97
|
-
name: string;
|
|
98
|
-
symbol: string;
|
|
99
|
-
decimals: number;
|
|
100
|
-
addresses: {
|
|
101
|
-
[x: number]: string;
|
|
102
|
-
};
|
|
103
|
-
coingeckoId: string;
|
|
104
|
-
};
|
|
105
|
-
OP: {
|
|
106
|
-
name: string;
|
|
107
|
-
symbol: string;
|
|
108
|
-
decimals: number;
|
|
109
|
-
addresses: {
|
|
110
|
-
[x: number]: string;
|
|
111
|
-
};
|
|
112
|
-
coingeckoId: string;
|
|
113
|
-
};
|
|
114
|
-
POOL: {
|
|
115
|
-
name: string;
|
|
116
|
-
symbol: string;
|
|
117
|
-
decimals: number;
|
|
118
|
-
addresses: {
|
|
119
|
-
[x: number]: string;
|
|
120
|
-
};
|
|
121
|
-
coingeckoId: string;
|
|
122
|
-
};
|
|
123
|
-
SNX: {
|
|
124
|
-
name: string;
|
|
125
|
-
symbol: string;
|
|
126
|
-
decimals: number;
|
|
127
|
-
addresses: {
|
|
128
|
-
[x: number]: string;
|
|
129
|
-
};
|
|
130
|
-
coingeckoId: string;
|
|
131
|
-
};
|
|
132
|
-
UMA: {
|
|
133
|
-
name: string;
|
|
134
|
-
symbol: string;
|
|
135
|
-
decimals: number;
|
|
136
|
-
addresses: {
|
|
137
|
-
[x: number]: string;
|
|
138
|
-
};
|
|
139
|
-
coingeckoId: string;
|
|
140
|
-
};
|
|
141
|
-
USDB: {
|
|
142
|
-
name: string;
|
|
143
|
-
symbol: string;
|
|
144
|
-
decimals: number;
|
|
145
|
-
addresses: {
|
|
146
|
-
[x: number]: string;
|
|
147
|
-
};
|
|
148
|
-
coingeckoId: string;
|
|
149
|
-
};
|
|
150
|
-
USDC: {
|
|
151
|
-
name: string;
|
|
152
|
-
symbol: string;
|
|
153
|
-
decimals: number;
|
|
154
|
-
addresses: {
|
|
155
|
-
[x: number]: string;
|
|
156
|
-
};
|
|
157
|
-
coingeckoId: string;
|
|
158
|
-
};
|
|
159
|
-
"USDC.e": {
|
|
160
|
-
name: string;
|
|
161
|
-
symbol: string;
|
|
162
|
-
decimals: number;
|
|
163
|
-
addresses: {
|
|
164
|
-
[x: number]: string;
|
|
165
|
-
};
|
|
166
|
-
coingeckoId: string;
|
|
167
|
-
};
|
|
168
|
-
USDbC: {
|
|
169
|
-
name: string;
|
|
170
|
-
symbol: string;
|
|
171
|
-
decimals: number;
|
|
172
|
-
addresses: {
|
|
173
|
-
[x: number]: string;
|
|
174
|
-
};
|
|
175
|
-
coingeckoId: string;
|
|
176
|
-
};
|
|
177
|
-
USDzC: {
|
|
178
|
-
name: string;
|
|
179
|
-
symbol: string;
|
|
180
|
-
decimals: number;
|
|
181
|
-
addresses: {
|
|
182
|
-
[x: number]: string;
|
|
183
|
-
};
|
|
184
|
-
coingeckoId: string;
|
|
185
|
-
};
|
|
186
|
-
USDT: {
|
|
187
|
-
name: string;
|
|
188
|
-
symbol: string;
|
|
189
|
-
decimals: number;
|
|
190
|
-
addresses: {
|
|
191
|
-
[x: number]: string;
|
|
192
|
-
};
|
|
193
|
-
coingeckoId: string;
|
|
194
|
-
};
|
|
195
|
-
WAZERO: {
|
|
196
|
-
name: string;
|
|
197
|
-
symbol: string;
|
|
198
|
-
decimals: number;
|
|
199
|
-
addresses: {
|
|
200
|
-
[x: number]: string;
|
|
201
|
-
};
|
|
202
|
-
coingeckoId: string;
|
|
203
|
-
};
|
|
204
|
-
WBTC: {
|
|
205
|
-
name: string;
|
|
206
|
-
symbol: string;
|
|
207
|
-
decimals: number;
|
|
208
|
-
addresses: {
|
|
209
|
-
[x: number]: string;
|
|
210
|
-
};
|
|
211
|
-
coingeckoId: string;
|
|
212
|
-
};
|
|
213
|
-
WETH: {
|
|
214
|
-
name: string;
|
|
215
|
-
symbol: string;
|
|
216
|
-
decimals: number;
|
|
217
|
-
addresses: {
|
|
218
|
-
[x: number]: string;
|
|
219
|
-
};
|
|
220
|
-
coingeckoId: string;
|
|
221
|
-
};
|
|
222
|
-
WMATIC: {
|
|
223
|
-
name: string;
|
|
224
|
-
symbol: string;
|
|
225
|
-
decimals: number;
|
|
226
|
-
addresses: {
|
|
227
|
-
[x: number]: string;
|
|
228
|
-
};
|
|
229
|
-
coingeckoId: string;
|
|
230
|
-
};
|
|
231
|
-
}, spokePoolAddress?: string | undefined, simulatedRelayerAddress?: string, coingeckoProApiKey?: string, logger?: Logger, gasMarkup?: number);
|
|
232
3
|
getTokenPrice(tokenSymbol: string): Promise<number>;
|
|
233
4
|
}
|
|
@@ -2,23 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AlephZeroQueries = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
var assert_1 = tslib_1.__importDefault(require("assert"));
|
|
6
|
-
var DeploymentUtils_1 = require("../../utils/DeploymentUtils");
|
|
7
|
-
var relayFeeCalculator_1 = require("../relayFeeCalculator");
|
|
8
5
|
var constants_1 = require("../../constants");
|
|
9
6
|
var Coingecko_1 = require("../../coingecko/Coingecko");
|
|
10
|
-
var utils_1 = require("../../utils");
|
|
11
7
|
var baseQuery_1 = require("./baseQuery");
|
|
12
8
|
var AlephZeroQueries = (function (_super) {
|
|
13
9
|
tslib_1.__extends(AlephZeroQueries, _super);
|
|
14
|
-
function AlephZeroQueries(
|
|
15
|
-
|
|
16
|
-
if (spokePoolAddress === void 0) { spokePoolAddress = (0, DeploymentUtils_1.getDeployedAddress)("SpokePool", constants_1.CHAIN_IDs.ALEPH_ZERO); }
|
|
17
|
-
if (simulatedRelayerAddress === void 0) { simulatedRelayerAddress = constants_1.DEFAULT_SIMULATED_RELAYER_ADDRESS; }
|
|
18
|
-
if (logger === void 0) { logger = relayFeeCalculator_1.DEFAULT_LOGGER; }
|
|
19
|
-
if (gasMarkup === void 0) { gasMarkup = 0; }
|
|
20
|
-
(0, assert_1.default)((0, utils_1.isDefined)(spokePoolAddress));
|
|
21
|
-
return _super.call(this, provider, symbolMapping, spokePoolAddress, simulatedRelayerAddress, gasMarkup, logger, coingeckoProApiKey, undefined, "usd") || this;
|
|
10
|
+
function AlephZeroQueries() {
|
|
11
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
22
12
|
}
|
|
23
13
|
AlephZeroQueries.prototype.getTokenPrice = function (tokenSymbol) {
|
|
24
14
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alephZero.js","sourceRoot":"","sources":["../../../../src/relayFeeCalculator/chain-queries/alephZero.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"alephZero.js","sourceRoot":"","sources":["../../../../src/relayFeeCalculator/chain-queries/alephZero.ts"],"names":[],"mappings":";;;;AAAA,6CAA4C;AAC5C,uDAAsD;AACtD,yCAAwC;AAExC;IAAsC,4CAAS;IAA/C;;IAeA,CAAC;IAdgB,wCAAa,GAA5B,UAA6B,WAAmB;;;;;;wBAC9C,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC;4BAAE,MAAM,IAAI,KAAK,CAAC,UAAG,WAAW,+BAA4B,CAAC,CAAC;wBAC5F,iBAAiB,GAAG,qBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;wBACvD,WAAM,iBAAiB,CAAC,yBAAyB,CACtE,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,SAAS,CAAC,qBAAS,CAAC,OAAO,CAAC,EAC5D,KAAK,CACN,EAAA;;wBAHK,KAAiB,SAGtB,EAHQ,UAAU,QAAA;wBAKQ,WAAM,iBAAiB,CAAC,yBAAyB,CAC1E,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,qBAAS,CAAC,OAAO,CAAC,EACxD,KAAK,CACN,EAAA;;wBAHK,KAAqB,SAG1B,EAHQ,cAAc,QAAA;wBAIvB,WAAO,MAAM,CAAC,CAAC,UAAU,GAAG,cAAc,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAC;;;;KAC5F;IACH,uBAAC;AAAD,CAAC,AAfD,CAAsC,qBAAS,GAe9C;AAfY,4CAAgB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { L2Provider } from "@eth-optimism/sdk/dist/interfaces/l2-provider";
|
|
2
|
-
import { providers } from "ethers";
|
|
2
|
+
import { PopulatedTransaction, providers } from "ethers";
|
|
3
3
|
import { Deposit } from "../../interfaces";
|
|
4
4
|
import { SpokePool } from "../../typechain";
|
|
5
|
-
import { BigNumberish, TransactionCostEstimate } from "../../utils";
|
|
5
|
+
import { BigNumberish, TransactionCostEstimate, BigNumber } from "../../utils";
|
|
6
6
|
import { Logger, QueryInterface } from "../relayFeeCalculator";
|
|
7
7
|
import { Transport } from "viem";
|
|
8
8
|
type Provider = providers.Provider;
|
|
@@ -16,17 +16,22 @@ export declare class QueryBase implements QueryInterface {
|
|
|
16
16
|
readonly symbolMapping: SymbolMappingType;
|
|
17
17
|
readonly spokePoolAddress: string;
|
|
18
18
|
readonly simulatedRelayerAddress: string;
|
|
19
|
-
readonly gasMarkup: number;
|
|
20
19
|
readonly logger: Logger;
|
|
21
20
|
readonly coingeckoProApiKey?: string | undefined;
|
|
22
21
|
readonly fixedGasPrice?: BigNumberish | undefined;
|
|
23
22
|
readonly coingeckoBaseCurrency: string;
|
|
24
23
|
readonly spokePool: SpokePool;
|
|
25
|
-
constructor(provider: Provider | OptimismProvider, symbolMapping: SymbolMappingType, spokePoolAddress: string, simulatedRelayerAddress: string,
|
|
24
|
+
constructor(provider: Provider | OptimismProvider, symbolMapping: SymbolMappingType, spokePoolAddress: string, simulatedRelayerAddress: string, logger: Logger, coingeckoProApiKey?: string | undefined, fixedGasPrice?: BigNumberish | undefined, coingeckoBaseCurrency?: string);
|
|
26
25
|
getGasCosts(deposit: Deposit, relayer?: string, options?: Partial<{
|
|
27
26
|
gasPrice: BigNumberish;
|
|
28
27
|
gasUnits: BigNumberish;
|
|
29
|
-
|
|
28
|
+
baseFeeMultiplier: BigNumber;
|
|
29
|
+
transport: Transport;
|
|
30
|
+
}>): Promise<TransactionCostEstimate>;
|
|
31
|
+
estimateGas(unsignedTx: PopulatedTransaction, senderAddress: string, provider: providers.Provider | L2Provider<providers.Provider>, options?: Partial<{
|
|
32
|
+
gasPrice: BigNumberish;
|
|
33
|
+
gasUnits: BigNumberish;
|
|
34
|
+
baseFeeMultiplier: BigNumber;
|
|
30
35
|
transport: Transport;
|
|
31
36
|
}>): Promise<TransactionCostEstimate>;
|
|
32
37
|
getTokenPrice(tokenSymbol: string): Promise<number>;
|
|
@@ -2,19 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.QueryBase = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
|
-
var
|
|
5
|
+
var l2_provider_1 = require("@eth-optimism/sdk/dist/l2-provider");
|
|
6
|
+
var ethers_1 = require("ethers");
|
|
6
7
|
var coingecko_1 = require("../../coingecko");
|
|
7
8
|
var constants_1 = require("../../constants");
|
|
8
9
|
var typechain_1 = require("../../typechain");
|
|
9
10
|
var utils_1 = require("../../utils");
|
|
11
|
+
var oracle_1 = require("../../gasPriceOracle/oracle");
|
|
10
12
|
var QueryBase = (function () {
|
|
11
|
-
function QueryBase(provider, symbolMapping, spokePoolAddress, simulatedRelayerAddress,
|
|
13
|
+
function QueryBase(provider, symbolMapping, spokePoolAddress, simulatedRelayerAddress, logger, coingeckoProApiKey, fixedGasPrice, coingeckoBaseCurrency) {
|
|
12
14
|
if (coingeckoBaseCurrency === void 0) { coingeckoBaseCurrency = "eth"; }
|
|
13
15
|
this.provider = provider;
|
|
14
16
|
this.symbolMapping = symbolMapping;
|
|
15
17
|
this.spokePoolAddress = spokePoolAddress;
|
|
16
18
|
this.simulatedRelayerAddress = simulatedRelayerAddress;
|
|
17
|
-
this.gasMarkup = gasMarkup;
|
|
18
19
|
this.logger = logger;
|
|
19
20
|
this.coingeckoProApiKey = coingeckoProApiKey;
|
|
20
21
|
this.fixedGasPrice = fixedGasPrice;
|
|
@@ -25,33 +26,76 @@ var QueryBase = (function () {
|
|
|
25
26
|
if (relayer === void 0) { relayer = constants_1.DEFAULT_SIMULATED_RELAYER_ADDRESS; }
|
|
26
27
|
if (options === void 0) { options = {}; }
|
|
27
28
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
28
|
-
var _a, gasPrice, gasUnits,
|
|
29
|
+
var _a, gasPrice, gasUnits, baseFeeMultiplier, transport, tx, _b, nativeGasCost, tokenGasCost, impliedGasPrice;
|
|
29
30
|
return tslib_1.__generator(this, function (_c) {
|
|
30
31
|
switch (_c.label) {
|
|
31
32
|
case 0:
|
|
32
|
-
_a = options.gasPrice, gasPrice = _a === void 0 ? this.fixedGasPrice : _a, gasUnits = options.gasUnits,
|
|
33
|
-
gasMarkup = omitMarkup ? 0 : this.gasMarkup;
|
|
34
|
-
(0, assert_1.default)(gasMarkup > -1 && gasMarkup <= 4, "Require -1.0 < Gas Markup (".concat(gasMarkup, ") <= 4.0 for a total gas multiplier within (0, +5.0]"));
|
|
35
|
-
gasTotalMultiplier = (0, utils_1.toBNWei)(1.0 + gasMarkup);
|
|
33
|
+
_a = options.gasPrice, gasPrice = _a === void 0 ? this.fixedGasPrice : _a, gasUnits = options.gasUnits, baseFeeMultiplier = options.baseFeeMultiplier, transport = options.transport;
|
|
36
34
|
return [4, (0, utils_1.populateV3Relay)(this.spokePool, deposit, relayer)];
|
|
37
35
|
case 1:
|
|
38
36
|
tx = _c.sent();
|
|
39
|
-
return [4,
|
|
37
|
+
return [4, this.estimateGas(tx, relayer, this.provider, {
|
|
40
38
|
gasPrice: gasPrice,
|
|
41
39
|
gasUnits: gasUnits,
|
|
40
|
+
baseFeeMultiplier: baseFeeMultiplier,
|
|
42
41
|
transport: transport,
|
|
43
42
|
})];
|
|
44
43
|
case 2:
|
|
45
44
|
_b = _c.sent(), nativeGasCost = _b.nativeGasCost, tokenGasCost = _b.tokenGasCost, impliedGasPrice = _b.gasPrice;
|
|
46
45
|
return [2, {
|
|
47
|
-
nativeGasCost: nativeGasCost
|
|
48
|
-
tokenGasCost: tokenGasCost
|
|
46
|
+
nativeGasCost: nativeGasCost,
|
|
47
|
+
tokenGasCost: tokenGasCost,
|
|
49
48
|
gasPrice: impliedGasPrice,
|
|
50
49
|
}];
|
|
51
50
|
}
|
|
52
51
|
});
|
|
53
52
|
});
|
|
54
53
|
};
|
|
54
|
+
QueryBase.prototype.estimateGas = function (unsignedTx, senderAddress, provider, options) {
|
|
55
|
+
if (options === void 0) { options = {}; }
|
|
56
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
57
|
+
var _a, _gasPrice, gasUnits, _b, baseFeeMultiplier, transport, chainId, voidSigner, queries, _c, nativeGasCost, gasPrice, tokenGasCost, populatedTransaction, l1GasCost, l2GasCost;
|
|
58
|
+
return tslib_1.__generator(this, function (_d) {
|
|
59
|
+
switch (_d.label) {
|
|
60
|
+
case 0:
|
|
61
|
+
_a = options || {}, _gasPrice = _a.gasPrice, gasUnits = _a.gasUnits, _b = _a.baseFeeMultiplier, baseFeeMultiplier = _b === void 0 ? (0, utils_1.toBNWei)("1") : _b, transport = _a.transport;
|
|
62
|
+
return [4, provider.getNetwork()];
|
|
63
|
+
case 1:
|
|
64
|
+
chainId = (_d.sent()).chainId;
|
|
65
|
+
voidSigner = new ethers_1.VoidSigner(senderAddress, provider);
|
|
66
|
+
queries = [
|
|
67
|
+
gasUnits ? Promise.resolve(utils_1.BigNumber.from(gasUnits)) : voidSigner.estimateGas(unsignedTx),
|
|
68
|
+
_gasPrice
|
|
69
|
+
? Promise.resolve({ maxFeePerGas: _gasPrice })
|
|
70
|
+
: (0, oracle_1.getGasPriceEstimate)(provider, { chainId: chainId, baseFeeMultiplier: baseFeeMultiplier, transport: transport, unsignedTx: unsignedTx }),
|
|
71
|
+
];
|
|
72
|
+
return [4, Promise.all(queries)];
|
|
73
|
+
case 2:
|
|
74
|
+
_c = _d.sent(), nativeGasCost = _c[0], gasPrice = _c[1].maxFeePerGas;
|
|
75
|
+
(0, utils_1.assert)(nativeGasCost.gt(utils_1.bnZero), "Gas cost should not be 0");
|
|
76
|
+
if (!(0, utils_1.chainIsOPStack)(chainId)) return [3, 5];
|
|
77
|
+
(0, utils_1.assert)((0, l2_provider_1.isL2Provider)(provider), "Unexpected provider for chain ID ".concat(chainId, "."));
|
|
78
|
+
return [4, voidSigner.populateTransaction(tslib_1.__assign(tslib_1.__assign({}, unsignedTx), { gasLimit: nativeGasCost }))];
|
|
79
|
+
case 3:
|
|
80
|
+
populatedTransaction = _d.sent();
|
|
81
|
+
return [4, provider.estimateL1GasCost(populatedTransaction)];
|
|
82
|
+
case 4:
|
|
83
|
+
l1GasCost = _d.sent();
|
|
84
|
+
l2GasCost = nativeGasCost.mul(gasPrice);
|
|
85
|
+
tokenGasCost = l1GasCost.add(l2GasCost);
|
|
86
|
+
return [3, 6];
|
|
87
|
+
case 5:
|
|
88
|
+
tokenGasCost = nativeGasCost.mul(gasPrice);
|
|
89
|
+
_d.label = 6;
|
|
90
|
+
case 6: return [2, {
|
|
91
|
+
nativeGasCost: nativeGasCost,
|
|
92
|
+
tokenGasCost: tokenGasCost,
|
|
93
|
+
gasPrice: tokenGasCost.div(nativeGasCost),
|
|
94
|
+
}];
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
};
|
|
55
99
|
QueryBase.prototype.getTokenPrice = function (tokenSymbol) {
|
|
56
100
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
57
101
|
var coingeckoInstance, _a, price;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseQuery.js","sourceRoot":"","sources":["../../../../src/relayFeeCalculator/chain-queries/baseQuery.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"baseQuery.js","sourceRoot":"","sources":["../../../../src/relayFeeCalculator/chain-queries/baseQuery.ts"],"names":[],"mappings":";;;;AACA,kEAA0F;AAE1F,iCAAqE;AACrE,6CAA4C;AAC5C,6CAA+E;AAE/E,6CAAgE;AAChE,qCASqB;AAGrB,sDAAkE;AAelE;IAaE,mBACW,QAAqC,EACrC,aAAgC,EAChC,gBAAwB,EACxB,uBAA+B,EAC/B,MAAc,EACd,kBAA2B,EAC3B,aAA4B,EAC5B,qBAAqC;QAArC,sCAAA,EAAA,6BAAqC;QAPrC,aAAQ,GAAR,QAAQ,CAA6B;QACrC,kBAAa,GAAb,aAAa,CAAmB;QAChC,qBAAgB,GAAhB,gBAAgB,CAAQ;QACxB,4BAAuB,GAAvB,uBAAuB,CAAQ;QAC/B,WAAM,GAAN,MAAM,CAAQ;QACd,uBAAkB,GAAlB,kBAAkB,CAAS;QAC3B,kBAAa,GAAb,aAAa,CAAe;QAC5B,0BAAqB,GAArB,qB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,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;4BAG7C,WAAO;4BACL,aAAa,eAAA;4BACb,YAAY,cAAA;4BACZ,QAAQ,EAAE,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC;yBAC1C,EAAC;;;;KACH;IAOK,iCAAa,GAAnB,UAAoB,WAAmB;;;;;;wBACrC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC;4BAAE,MAAM,IAAI,KAAK,CAAC,UAAG,WAAW,+BAA4B,CAAC,CAAC;wBAC5F,iBAAiB,GAAG,qBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;wBAC5D,WAAM,iBAAiB,CAAC,yBAAyB,CACjE,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,SAAS,CAAC,qBAAS,CAAC,OAAO,CAAC,EAC5D,IAAI,CAAC,qBAAqB,CAC3B,EAAA;;wBAHK,KAAY,SAGjB,EAHQ,KAAK,QAAA;wBAId,WAAO,KAAK,EAAC;;;;KACd;IAOD,oCAAgB,GAAhB,UAAiB,WAAmB;QAClC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,UAAG,WAAW,+BAA4B,CAAC,CAAC;QAClG,OAAO,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC;IAClD,CAAC;IACH,gBAAC;AAAD,CAAC,AAtJD,IAsJC;AAtJY,8BAAS"}
|
|
@@ -228,5 +228,5 @@ export declare class QueryBase__factory {
|
|
|
228
228
|
};
|
|
229
229
|
coingeckoId: string;
|
|
230
230
|
};
|
|
231
|
-
}, spokePoolAddress?: string | undefined, simulatedRelayerAddress?: string, coingeckoProApiKey?: string, logger?: Logger,
|
|
231
|
+
}, spokePoolAddress?: string | undefined, simulatedRelayerAddress?: string, coingeckoProApiKey?: string, logger?: Logger, coingeckoBaseCurrency?: string): QueryBase;
|
|
232
232
|
}
|