@across-protocol/sdk 4.3.139-alpha.1 → 4.3.139-alpha.2
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/src/gasPriceOracle/index.d.ts +1 -1
- package/dist/cjs/src/gasPriceOracle/oracle.d.ts +1 -3
- package/dist/cjs/src/gasPriceOracle/oracle.js +11 -15
- package/dist/cjs/src/gasPriceOracle/oracle.js.map +1 -1
- package/dist/cjs/src/gasPriceOracle/types.d.ts +1 -6
- package/dist/cjs/src/gasPriceOracle/types.js +0 -5
- package/dist/cjs/src/gasPriceOracle/types.js.map +1 -1
- package/dist/cjs/src/relayFeeCalculator/chain-queries/factory.d.ts +1 -2
- package/dist/cjs/src/relayFeeCalculator/chain-queries/factory.js +0 -5
- package/dist/cjs/src/relayFeeCalculator/chain-queries/factory.js.map +1 -1
- package/dist/cjs/src/relayFeeCalculator/chain-queries/index.d.ts +0 -1
- package/dist/cjs/src/relayFeeCalculator/chain-queries/index.js +0 -1
- package/dist/cjs/src/relayFeeCalculator/chain-queries/index.js.map +1 -1
- package/dist/esm/src/gasPriceOracle/index.d.ts +1 -1
- package/dist/esm/src/gasPriceOracle/oracle.d.ts +1 -3
- package/dist/esm/src/gasPriceOracle/oracle.js +12 -17
- package/dist/esm/src/gasPriceOracle/oracle.js.map +1 -1
- package/dist/esm/src/gasPriceOracle/types.d.ts +1 -6
- package/dist/esm/src/gasPriceOracle/types.js +0 -4
- package/dist/esm/src/gasPriceOracle/types.js.map +1 -1
- package/dist/esm/src/relayFeeCalculator/chain-queries/factory.d.ts +1 -2
- package/dist/esm/src/relayFeeCalculator/chain-queries/factory.js +1 -6
- package/dist/esm/src/relayFeeCalculator/chain-queries/factory.js.map +1 -1
- package/dist/esm/src/relayFeeCalculator/chain-queries/index.d.ts +0 -1
- package/dist/esm/src/relayFeeCalculator/chain-queries/index.js +0 -1
- package/dist/esm/src/relayFeeCalculator/chain-queries/index.js.map +1 -1
- package/dist/types/src/gasPriceOracle/index.d.ts +1 -1
- package/dist/types/src/gasPriceOracle/index.d.ts.map +1 -1
- package/dist/types/src/gasPriceOracle/oracle.d.ts +1 -3
- package/dist/types/src/gasPriceOracle/oracle.d.ts.map +1 -1
- package/dist/types/src/gasPriceOracle/types.d.ts +1 -6
- package/dist/types/src/gasPriceOracle/types.d.ts.map +1 -1
- package/dist/types/src/relayFeeCalculator/chain-queries/factory.d.ts +1 -2
- package/dist/types/src/relayFeeCalculator/chain-queries/factory.d.ts.map +1 -1
- package/dist/types/src/relayFeeCalculator/chain-queries/index.d.ts +0 -1
- package/dist/types/src/relayFeeCalculator/chain-queries/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/gasPriceOracle/index.ts +1 -1
- package/src/gasPriceOracle/oracle.ts +4 -23
- package/src/gasPriceOracle/types.ts +1 -11
- package/src/relayFeeCalculator/chain-queries/factory.ts +2 -16
- package/src/relayFeeCalculator/chain-queries/index.ts +0 -1
- package/dist/cjs/src/gasPriceOracle/adapters/tron.d.ts +0 -4
- package/dist/cjs/src/gasPriceOracle/adapters/tron.js +0 -58
- package/dist/cjs/src/gasPriceOracle/adapters/tron.js.map +0 -1
- package/dist/cjs/src/relayFeeCalculator/chain-queries/tvmQuery.d.ts +0 -16
- package/dist/cjs/src/relayFeeCalculator/chain-queries/tvmQuery.js +0 -52
- package/dist/cjs/src/relayFeeCalculator/chain-queries/tvmQuery.js.map +0 -1
- package/dist/esm/src/gasPriceOracle/adapters/tron.d.ts +0 -10
- package/dist/esm/src/gasPriceOracle/adapters/tron.js +0 -68
- package/dist/esm/src/gasPriceOracle/adapters/tron.js.map +0 -1
- package/dist/esm/src/relayFeeCalculator/chain-queries/tvmQuery.d.ts +0 -32
- package/dist/esm/src/relayFeeCalculator/chain-queries/tvmQuery.js +0 -65
- package/dist/esm/src/relayFeeCalculator/chain-queries/tvmQuery.js.map +0 -1
- package/dist/types/src/gasPriceOracle/adapters/tron.d.ts +0 -11
- package/dist/types/src/gasPriceOracle/adapters/tron.d.ts.map +0 -1
- package/dist/types/src/relayFeeCalculator/chain-queries/tvmQuery.d.ts +0 -33
- package/dist/types/src/relayFeeCalculator/chain-queries/tvmQuery.d.ts.map +0 -1
- package/src/gasPriceOracle/adapters/tron.ts +0 -50
- package/src/relayFeeCalculator/chain-queries/tvmQuery.ts +0 -88
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { getGasPriceEstimate, GasPriceEstimateOptions } from "./oracle";
|
|
2
|
-
export { GasPriceEstimate, EvmGasPriceEstimate, SvmGasPriceEstimate
|
|
2
|
+
export { GasPriceEstimate, EvmGasPriceEstimate, SvmGasPriceEstimate } from "./types";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Transport } from "viem";
|
|
2
2
|
import { BigNumber } from "../utils";
|
|
3
3
|
import { SVMProvider as SolanaProvider } from "../arch/svm";
|
|
4
|
-
import {
|
|
5
|
-
import { EvmGasPriceEstimate, SvmGasPriceEstimate, TvmGasPriceEstimate } from "./types";
|
|
4
|
+
import { EvmGasPriceEstimate, SvmGasPriceEstimate } from "./types";
|
|
6
5
|
import { EvmProvider } from "../arch/evm/types";
|
|
7
6
|
export interface GasPriceEstimateOptions {
|
|
8
7
|
baseFeeMultiplier: BigNumber;
|
|
@@ -21,4 +20,3 @@ export interface FeeHistoryOptions {
|
|
|
21
20
|
}
|
|
22
21
|
export declare function getGasPriceEstimate(provider: EvmProvider, opts?: Partial<GasPriceEstimateOptions>): Promise<EvmGasPriceEstimate>;
|
|
23
22
|
export declare function getGasPriceEstimate(provider: SolanaProvider, opts?: Partial<GasPriceEstimateOptions>): Promise<SvmGasPriceEstimate>;
|
|
24
|
-
export declare function getGasPriceEstimate(provider: TronWeb, opts?: Partial<GasPriceEstimateOptions>): Promise<TvmGasPriceEstimate>;
|
|
@@ -11,36 +11,31 @@ var ethereum = tslib_1.__importStar(require("./adapters/ethereum"));
|
|
|
11
11
|
var polygon = tslib_1.__importStar(require("./adapters/polygon"));
|
|
12
12
|
var lineaViem = tslib_1.__importStar(require("./adapters/linea-viem"));
|
|
13
13
|
var solana = tslib_1.__importStar(require("./adapters/solana"));
|
|
14
|
-
var tron = tslib_1.__importStar(require("./adapters/tron"));
|
|
15
14
|
var GAS_PRICE_ESTIMATE_DEFAULTS = {
|
|
16
15
|
legacyFallback: true,
|
|
17
16
|
};
|
|
18
17
|
var VIEM_CHAINS = [constants_1.CHAIN_IDs.LINEA];
|
|
19
18
|
function getGasPriceEstimate(provider_1) {
|
|
20
19
|
return tslib_1.__awaiter(this, arguments, void 0, function (provider, opts) {
|
|
21
|
-
var baseFeeMultiplier, priorityFeeMultiplier, optsWithDefaults_1,
|
|
22
|
-
var _b, _c, _d, _e
|
|
20
|
+
var baseFeeMultiplier, priorityFeeMultiplier, optsWithDefaults_1, chainId, _a, optsWithDefaults, useViem;
|
|
21
|
+
var _b, _c, _d, _e;
|
|
23
22
|
if (opts === void 0) { opts = {}; }
|
|
24
|
-
return tslib_1.__generator(this, function (
|
|
25
|
-
switch (
|
|
23
|
+
return tslib_1.__generator(this, function (_f) {
|
|
24
|
+
switch (_f.label) {
|
|
26
25
|
case 0:
|
|
27
26
|
baseFeeMultiplier = (_b = opts.baseFeeMultiplier) !== null && _b !== void 0 ? _b : (0, utils_1.toBNWei)("1");
|
|
28
27
|
priorityFeeMultiplier = (_c = opts.priorityFeeMultiplier) !== null && _c !== void 0 ? _c : (0, utils_1.toBNWei)("1");
|
|
29
|
-
if ((0, utils_1.isTvmProvider)(provider)) {
|
|
30
|
-
optsWithDefaults_1 = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, GAS_PRICE_ESTIMATE_DEFAULTS), { baseFeeMultiplier: baseFeeMultiplier, priorityFeeMultiplier: priorityFeeMultiplier }), opts), { chainId: (_d = opts.chainId) !== null && _d !== void 0 ? _d : constants_1.CHAIN_IDs.TRON });
|
|
31
|
-
return [2, tron.gasPrices(provider, optsWithDefaults_1)];
|
|
32
|
-
}
|
|
33
28
|
if (!(0, utils_1.isEvmProvider)(provider)) {
|
|
34
|
-
|
|
35
|
-
return [2, solana.messageFee(provider,
|
|
29
|
+
optsWithDefaults_1 = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, GAS_PRICE_ESTIMATE_DEFAULTS), { baseFeeMultiplier: baseFeeMultiplier, priorityFeeMultiplier: priorityFeeMultiplier }), opts), { chainId: (_d = opts.chainId) !== null && _d !== void 0 ? _d : constants_1.CHAIN_IDs.SOLANA });
|
|
30
|
+
return [2, solana.messageFee(provider, optsWithDefaults_1)];
|
|
36
31
|
}
|
|
37
|
-
if (!((
|
|
38
|
-
_a =
|
|
32
|
+
if (!((_e = opts.chainId) !== null && _e !== void 0)) return [3, 1];
|
|
33
|
+
_a = _e;
|
|
39
34
|
return [3, 3];
|
|
40
35
|
case 1: return [4, provider.getNetwork()];
|
|
41
36
|
case 2:
|
|
42
|
-
_a = (
|
|
43
|
-
|
|
37
|
+
_a = (_f.sent()).chainId;
|
|
38
|
+
_f.label = 3;
|
|
44
39
|
case 3:
|
|
45
40
|
chainId = _a;
|
|
46
41
|
optsWithDefaults = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, GAS_PRICE_ESTIMATE_DEFAULTS), { baseFeeMultiplier: baseFeeMultiplier, priorityFeeMultiplier: priorityFeeMultiplier }), opts), { chainId: chainId });
|
|
@@ -59,6 +54,7 @@ function getGasPriceEthers(provider, opts) {
|
|
|
59
54
|
_a[constants_1.CHAIN_IDs.POLYGON] = polygon.gasStation,
|
|
60
55
|
_a[constants_1.CHAIN_IDs.SCROLL] = ethereum.legacy,
|
|
61
56
|
_a[constants_1.CHAIN_IDs.TEMPO] = ethereum.eip1559,
|
|
57
|
+
_a[constants_1.CHAIN_IDs.TRON] = ethereum.legacy,
|
|
62
58
|
_a[constants_1.CHAIN_IDs.ZK_SYNC] = ethereum.legacy,
|
|
63
59
|
_a[constants_1.CHAIN_IDs.POLYGON_AMOY] = polygon.gasStation,
|
|
64
60
|
_a);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oracle.js","sourceRoot":"","sources":["../../../../src/gasPriceOracle/oracle.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"oracle.js","sourceRoot":"","sources":["../../../../src/gasPriceOracle/oracle.ts"],"names":[],"mappings":";;AAgEA,kDAgCC;;AAhGD,0DAA4B;AAG5B,0CAAyC;AACzC,kCAA8F;AAG9F,+BAAyC;AACzC,oEAAgD;AAChD,oEAAgD;AAChD,kEAA8C;AAC9C,uEAAmD;AACnD,gEAA4C;AA2B5C,IAAM,2BAA2B,GAAG;IAClC,cAAc,EAAE,IAAI;CACrB,CAAC;AAGF,IAAM,WAAW,GAAG,CAAC,qBAAS,CAAC,KAAK,CAAC,CAAC;AAoBtC,SAAsB,mBAAmB;gEACvC,QAAsC,EACtC,IAA2C;;;QAA3C,qBAAA,EAAA,SAA2C;;;;oBAErC,iBAAiB,GAAG,MAAA,IAAI,CAAC,iBAAiB,mCAAI,IAAA,eAAO,EAAC,GAAG,CAAC,CAAC;oBAC3D,qBAAqB,GAAG,MAAA,IAAI,CAAC,qBAAqB,mCAAI,IAAA,eAAO,EAAC,GAAG,CAAC,CAAC;oBAGzE,IAAI,CAAC,IAAA,qBAAa,EAAC,QAAQ,CAAC,EAAE,CAAC;wBACvB,6FACD,2BAA2B,KAC9B,iBAAiB,mBAAA,EACjB,qBAAqB,uBAAA,KAClB,IAAI,KACP,OAAO,EAAE,MAAA,IAAI,CAAC,OAAO,mCAAI,qBAAS,CAAC,MAAM,GAC1C,CAAC;wBACF,WAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,kBAAgB,CAAC,EAAC;oBACvD,CAAC;gCAGe,IAAI,CAAC,OAAO;;;wBAAK,WAAM,QAAQ,CAAC,UAAU,EAAE,EAAA;;oBAA5B,KAAA,CAAC,SAA2B,CAAC,CAAC,OAAO,CAAA;;;oBAA/D,OAAO,KAAwD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AC,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE,CAAC;qBACtE,EAAC;;;;CACH"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Chain, type Transport, PublicClient, FeeValuesEIP1559 } from "viem";
|
|
2
2
|
import { BigNumber } from "../utils";
|
|
3
3
|
export type InternalGasPriceEstimate = FeeValuesEIP1559;
|
|
4
|
-
export type GasPriceEstimate = EvmGasPriceEstimate | SvmGasPriceEstimate
|
|
4
|
+
export type GasPriceEstimate = EvmGasPriceEstimate | SvmGasPriceEstimate;
|
|
5
5
|
export type EvmGasPriceEstimate = {
|
|
6
6
|
maxFeePerGas: BigNumber;
|
|
7
7
|
maxPriorityFeePerGas: BigNumber;
|
|
@@ -10,10 +10,6 @@ export type SvmGasPriceEstimate = {
|
|
|
10
10
|
baseFee: BigNumber;
|
|
11
11
|
microLamportsPerComputeUnit: BigNumber;
|
|
12
12
|
};
|
|
13
|
-
export type TvmGasPriceEstimate = {
|
|
14
|
-
energyPrice: BigNumber;
|
|
15
|
-
bandwidthPrice: BigNumber;
|
|
16
|
-
};
|
|
17
13
|
export interface GasPriceFeed {
|
|
18
14
|
(provider: PublicClient<Transport, Chain>, chainId: number): Promise<InternalGasPriceEstimate>;
|
|
19
15
|
}
|
|
@@ -21,4 +17,3 @@ export declare function isEVMGasPrice(gasPrice: GasPriceEstimate): gasPrice is E
|
|
|
21
17
|
export declare function isType0Gas(gas: EvmGasPriceEstimate): boolean;
|
|
22
18
|
export declare function isType2Gas(gas: EvmGasPriceEstimate): boolean;
|
|
23
19
|
export declare function isSVMGasPrice(gasPrice: GasPriceEstimate): gasPrice is SvmGasPriceEstimate;
|
|
24
|
-
export declare function isTVMGasPrice(gasPrice: GasPriceEstimate): gasPrice is TvmGasPriceEstimate;
|
|
@@ -4,7 +4,6 @@ exports.isEVMGasPrice = isEVMGasPrice;
|
|
|
4
4
|
exports.isType0Gas = isType0Gas;
|
|
5
5
|
exports.isType2Gas = isType2Gas;
|
|
6
6
|
exports.isSVMGasPrice = isSVMGasPrice;
|
|
7
|
-
exports.isTVMGasPrice = isTVMGasPrice;
|
|
8
7
|
var utils_1 = require("../utils");
|
|
9
8
|
function isEVMGasPrice(gasPrice) {
|
|
10
9
|
var _a = gasPrice, maxFeePerGas = _a.maxFeePerGas, maxPriorityFeePerGas = _a.maxPriorityFeePerGas;
|
|
@@ -20,8 +19,4 @@ function isSVMGasPrice(gasPrice) {
|
|
|
20
19
|
var _a = gasPrice, baseFee = _a.baseFee, microLamportsPerComputeUnit = _a.microLamportsPerComputeUnit;
|
|
21
20
|
return (0, utils_1.isDefined)(baseFee) && (0, utils_1.isDefined)(microLamportsPerComputeUnit);
|
|
22
21
|
}
|
|
23
|
-
function isTVMGasPrice(gasPrice) {
|
|
24
|
-
var _a = gasPrice, energyPrice = _a.energyPrice, bandwidthPrice = _a.bandwidthPrice;
|
|
25
|
-
return (0, utils_1.isDefined)(energyPrice) && (0, utils_1.isDefined)(bandwidthPrice);
|
|
26
|
-
}
|
|
27
22
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/gasPriceOracle/types.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/gasPriceOracle/types.ts"],"names":[],"mappings":";;AAoBA,sCAGC;AAED,gCAEC;AAED,gCAEC;AAED,sCAGC;AAnCD,kCAAwD;AAmBxD,SAAgB,aAAa,CAAC,QAA0B;IAChD,IAAA,KAAyC,QAA+B,EAAtE,YAAY,kBAAA,EAAE,oBAAoB,0BAAoC,CAAC;IAC/E,OAAO,IAAA,iBAAS,EAAC,YAAY,CAAC,IAAI,IAAA,iBAAS,EAAC,oBAAoB,CAAC,CAAC;AACpE,CAAC;AAED,SAAgB,UAAU,CAAC,GAAwB;IACjD,OAAO,GAAG,CAAC,oBAAoB,CAAC,EAAE,CAAC,cAAM,CAAC,CAAC;AAC7C,CAAC;AAED,SAAgB,UAAU,CAAC,GAAwB;IACjD,OAAO,GAAG,CAAC,oBAAoB,CAAC,EAAE,CAAC,cAAM,CAAC,CAAC;AAC7C,CAAC;AAED,SAAgB,aAAa,CAAC,QAA0B;IAChD,IAAA,KAA2C,QAA+B,EAAxE,OAAO,aAAA,EAAE,2BAA2B,iCAAoC,CAAC;IACjF,OAAO,IAAA,iBAAS,EAAC,OAAO,CAAC,IAAI,IAAA,iBAAS,EAAC,2BAA2B,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -4,7 +4,6 @@ import { QueryBase } from "./baseQuery";
|
|
|
4
4
|
import { SVMProvider as svmProvider } from "../../arch/svm";
|
|
5
5
|
import { Logger } from "../relayFeeCalculator";
|
|
6
6
|
import { SvmQuery } from "./svmQuery";
|
|
7
|
-
import { TvmQuery } from "./tvmQuery";
|
|
8
7
|
export declare class QueryBase__factory {
|
|
9
8
|
static create(chainId: number, provider: providers.Provider | svmProvider | TronWeb, symbolMapping?: {
|
|
10
9
|
ACX: {
|
|
@@ -408,5 +407,5 @@ export declare class QueryBase__factory {
|
|
|
408
407
|
addresses: {};
|
|
409
408
|
coingeckoId: string;
|
|
410
409
|
};
|
|
411
|
-
}, spokePoolAddress?: string | undefined, relayerAddress?: import("../../utils").Address, coingeckoProApiKey?: string, logger?: Logger, coingeckoBaseCurrency?: string): QueryBase | SvmQuery
|
|
410
|
+
}, spokePoolAddress?: string | undefined, relayerAddress?: import("../../utils").Address, coingeckoProApiKey?: string, logger?: Logger, coingeckoBaseCurrency?: string): QueryBase | SvmQuery;
|
|
412
411
|
}
|
|
@@ -13,7 +13,6 @@ var baseQuery_1 = require("./baseQuery");
|
|
|
13
13
|
var relayFeeCalculator_1 = require("../relayFeeCalculator");
|
|
14
14
|
var customGasToken_1 = require("./customGasToken");
|
|
15
15
|
var svmQuery_1 = require("./svmQuery");
|
|
16
|
-
var tvmQuery_1 = require("./tvmQuery");
|
|
17
16
|
var fixedGasPrice = (_a = {},
|
|
18
17
|
_a[constants_1.CHAIN_IDs.BOBA] = 1e9,
|
|
19
18
|
_a);
|
|
@@ -48,10 +47,6 @@ var QueryBase__factory = (function () {
|
|
|
48
47
|
(0, assert_1.default)(relayerAddress.isSVM());
|
|
49
48
|
return new svmQuery_1.SvmQuery(provider, symbolMapping, utils_1.SvmAddress.from(spokePoolAddress), relayerAddress, logger, coingeckoProApiKey, fixedGasPrice[chainId], coingeckoBaseCurrency);
|
|
50
49
|
}
|
|
51
|
-
if ((0, utils_1.chainIsTvm)(chainId)) {
|
|
52
|
-
(0, assert_1.default)(relayerAddress.isEVM());
|
|
53
|
-
return new tvmQuery_1.TvmQuery(provider, symbolMapping, spokePoolAddress, relayerAddress, logger, coingeckoProApiKey, fixedGasPrice[chainId], coingeckoBaseCurrency);
|
|
54
|
-
}
|
|
55
50
|
provider = (0, utils_1.chainIsOPStack)(chainId)
|
|
56
51
|
? (0, sdk_1.asL2Provider)(provider)
|
|
57
52
|
: provider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../../src/relayFeeCalculator/chain-queries/factory.ts"],"names":[],"mappings":";;;;;AAAA,0DAA4B;AAC5B,wDAA0E;AAC1E,wDAAgE;AAChE,yCAAiD;AAGjD,6CAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../../src/relayFeeCalculator/chain-queries/factory.ts"],"names":[],"mappings":";;;;;AAAA,0DAA4B;AAC5B,wDAA0E;AAC1E,wDAAgE;AAChE,yCAAiD;AAGjD,6CAAoD;AACpD,qCAA4F;AAC5F,yCAAwC;AAExC,4DAAkF;AAClF,mDAAyD;AACzD,uCAAsC;AAMtC,IAAM,aAAa;IACjB,GAAC,qBAAS,CAAC,IAAI,IAAG,GAAG;OACtB,CAAC;AAEF;IAAA;IA6DA,CAAC;IA5DQ,yBAAM,GAAb,UACE,OAAe,EACf,QAAoD,EACpD,aAAiC,EACjC,gBAA2D,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9C,CAAC,CAAE,QAA+B,CAAC;QAErC,IAAA,gBAAM,EAAC,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC;QAC/B,OAAO,IAAI,qBAAS,CAClB,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,MAAM,EACN,kBAAkB,EAClB,aAAa,CAAC,OAAO,CAAC,EACtB,qBAAqB,CACtB,CAAC;IACJ,CAAC;IACH,yBAAC;AAAD,CAAC,AA7DD,IA6DC;AA7DY,gDAAkB"}
|
|
@@ -5,5 +5,4 @@ tslib_1.__exportStar(require("./baseQuery"), exports);
|
|
|
5
5
|
tslib_1.__exportStar(require("./factory"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./customGasToken"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./svmQuery"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./tvmQuery"), exports);
|
|
9
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/relayFeeCalculator/chain-queries/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,oDAA0B;AAC1B,2DAAiC;AACjC,qDAA2B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/relayFeeCalculator/chain-queries/index.ts"],"names":[],"mappings":";;;AAAA,sDAA4B;AAC5B,oDAA0B;AAC1B,2DAAiC;AACjC,qDAA2B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { getGasPriceEstimate, GasPriceEstimateOptions } from "./oracle";
|
|
2
|
-
export { GasPriceEstimate, EvmGasPriceEstimate, SvmGasPriceEstimate
|
|
2
|
+
export { GasPriceEstimate, EvmGasPriceEstimate, SvmGasPriceEstimate } from "./types";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Transport } from "viem";
|
|
2
2
|
import { BigNumber } from "../utils";
|
|
3
3
|
import { SVMProvider as SolanaProvider } from "../arch/svm";
|
|
4
|
-
import {
|
|
5
|
-
import { EvmGasPriceEstimate, SvmGasPriceEstimate, TvmGasPriceEstimate } from "./types";
|
|
4
|
+
import { EvmGasPriceEstimate, SvmGasPriceEstimate } from "./types";
|
|
6
5
|
import { EvmProvider } from "../arch/evm/types";
|
|
7
6
|
export interface GasPriceEstimateOptions {
|
|
8
7
|
baseFeeMultiplier: BigNumber;
|
|
@@ -21,4 +20,3 @@ export interface FeeHistoryOptions {
|
|
|
21
20
|
}
|
|
22
21
|
export declare function getGasPriceEstimate(provider: EvmProvider, opts?: Partial<GasPriceEstimateOptions>): Promise<EvmGasPriceEstimate>;
|
|
23
22
|
export declare function getGasPriceEstimate(provider: SolanaProvider, opts?: Partial<GasPriceEstimateOptions>): Promise<SvmGasPriceEstimate>;
|
|
24
|
-
export declare function getGasPriceEstimate(provider: TronWeb, opts?: Partial<GasPriceEstimateOptions>): Promise<TvmGasPriceEstimate>;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import assert from "assert";
|
|
3
3
|
import { CHAIN_IDs } from "../constants";
|
|
4
|
-
import { BigNumber, fixedPointAdjustment, isEvmProvider,
|
|
4
|
+
import { BigNumber, fixedPointAdjustment, isEvmProvider, toBNWei, isDefined } from "../utils";
|
|
5
5
|
import { getPublicClient } from "./util";
|
|
6
6
|
import * as arbitrum from "./adapters/arbitrum";
|
|
7
7
|
import * as ethereum from "./adapters/ethereum";
|
|
8
8
|
import * as polygon from "./adapters/polygon";
|
|
9
9
|
import * as lineaViem from "./adapters/linea-viem";
|
|
10
10
|
import * as solana from "./adapters/solana";
|
|
11
|
-
import * as tron from "./adapters/tron";
|
|
12
11
|
var GAS_PRICE_ESTIMATE_DEFAULTS = {
|
|
13
12
|
legacyFallback: true,
|
|
14
13
|
};
|
|
@@ -22,31 +21,26 @@ var VIEM_CHAINS = [CHAIN_IDs.LINEA];
|
|
|
22
21
|
*/
|
|
23
22
|
export function getGasPriceEstimate(provider_1) {
|
|
24
23
|
return __awaiter(this, arguments, void 0, function (provider, opts) {
|
|
25
|
-
var baseFeeMultiplier, priorityFeeMultiplier, optsWithDefaults_1,
|
|
26
|
-
var _b, _c, _d, _e
|
|
24
|
+
var baseFeeMultiplier, priorityFeeMultiplier, optsWithDefaults_1, chainId, _a, optsWithDefaults, useViem;
|
|
25
|
+
var _b, _c, _d, _e;
|
|
27
26
|
if (opts === void 0) { opts = {}; }
|
|
28
|
-
return __generator(this, function (
|
|
29
|
-
switch (
|
|
27
|
+
return __generator(this, function (_f) {
|
|
28
|
+
switch (_f.label) {
|
|
30
29
|
case 0:
|
|
31
30
|
baseFeeMultiplier = (_b = opts.baseFeeMultiplier) !== null && _b !== void 0 ? _b : toBNWei("1");
|
|
32
31
|
priorityFeeMultiplier = (_c = opts.priorityFeeMultiplier) !== null && _c !== void 0 ? _c : toBNWei("1");
|
|
33
|
-
// Exit here if we need to estimate on TRON.
|
|
34
|
-
if (isTvmProvider(provider)) {
|
|
35
|
-
optsWithDefaults_1 = __assign(__assign(__assign(__assign({}, GAS_PRICE_ESTIMATE_DEFAULTS), { baseFeeMultiplier: baseFeeMultiplier, priorityFeeMultiplier: priorityFeeMultiplier }), opts), { chainId: (_d = opts.chainId) !== null && _d !== void 0 ? _d : CHAIN_IDs.TRON });
|
|
36
|
-
return [2 /*return*/, tron.gasPrices(provider, optsWithDefaults_1)];
|
|
37
|
-
}
|
|
38
32
|
// Exit here if we need to estimate on Solana.
|
|
39
33
|
if (!isEvmProvider(provider)) {
|
|
40
|
-
|
|
41
|
-
return [2 /*return*/, solana.messageFee(provider,
|
|
34
|
+
optsWithDefaults_1 = __assign(__assign(__assign(__assign({}, GAS_PRICE_ESTIMATE_DEFAULTS), { baseFeeMultiplier: baseFeeMultiplier, priorityFeeMultiplier: priorityFeeMultiplier }), opts), { chainId: (_d = opts.chainId) !== null && _d !== void 0 ? _d : CHAIN_IDs.SOLANA });
|
|
35
|
+
return [2 /*return*/, solana.messageFee(provider, optsWithDefaults_1)];
|
|
42
36
|
}
|
|
43
|
-
if (!((
|
|
44
|
-
_a =
|
|
37
|
+
if (!((_e = opts.chainId) !== null && _e !== void 0)) return [3 /*break*/, 1];
|
|
38
|
+
_a = _e;
|
|
45
39
|
return [3 /*break*/, 3];
|
|
46
40
|
case 1: return [4 /*yield*/, provider.getNetwork()];
|
|
47
41
|
case 2:
|
|
48
|
-
_a = (
|
|
49
|
-
|
|
42
|
+
_a = (_f.sent()).chainId;
|
|
43
|
+
_f.label = 3;
|
|
50
44
|
case 3:
|
|
51
45
|
chainId = _a;
|
|
52
46
|
optsWithDefaults = __assign(__assign(__assign(__assign({}, GAS_PRICE_ESTIMATE_DEFAULTS), { baseFeeMultiplier: baseFeeMultiplier, priorityFeeMultiplier: priorityFeeMultiplier }), opts), { chainId: chainId });
|
|
@@ -73,6 +67,7 @@ function getGasPriceEthers(provider, opts) {
|
|
|
73
67
|
_a[CHAIN_IDs.POLYGON] = polygon.gasStation,
|
|
74
68
|
_a[CHAIN_IDs.SCROLL] = ethereum.legacy,
|
|
75
69
|
_a[CHAIN_IDs.TEMPO] = ethereum.eip1559,
|
|
70
|
+
_a[CHAIN_IDs.TRON] = ethereum.legacy,
|
|
76
71
|
_a[CHAIN_IDs.ZK_SYNC] = ethereum.legacy,
|
|
77
72
|
// Testnet
|
|
78
73
|
_a[CHAIN_IDs.POLYGON_AMOY] = polygon.gasStation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oracle.js","sourceRoot":"","sources":["../../../../src/gasPriceOracle/oracle.ts"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"oracle.js","sourceRoot":"","sources":["../../../../src/gasPriceOracle/oracle.ts"],"names":[],"mappings":";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MAAM,CAAC,CAAC,CAAC,EAAC;;wBAGrC,sBAAO;wBACL,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;wBACrD,oBAAoB,EAAE,SAAS,CAAC,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE,CAAC;qBACtE,EAAC;;;;CACH"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Chain, type Transport, PublicClient, FeeValuesEIP1559 } from "viem";
|
|
2
2
|
import { BigNumber } from "../utils";
|
|
3
3
|
export type InternalGasPriceEstimate = FeeValuesEIP1559;
|
|
4
|
-
export type GasPriceEstimate = EvmGasPriceEstimate | SvmGasPriceEstimate
|
|
4
|
+
export type GasPriceEstimate = EvmGasPriceEstimate | SvmGasPriceEstimate;
|
|
5
5
|
export type EvmGasPriceEstimate = {
|
|
6
6
|
maxFeePerGas: BigNumber;
|
|
7
7
|
maxPriorityFeePerGas: BigNumber;
|
|
@@ -10,10 +10,6 @@ export type SvmGasPriceEstimate = {
|
|
|
10
10
|
baseFee: BigNumber;
|
|
11
11
|
microLamportsPerComputeUnit: BigNumber;
|
|
12
12
|
};
|
|
13
|
-
export type TvmGasPriceEstimate = {
|
|
14
|
-
energyPrice: BigNumber;
|
|
15
|
-
bandwidthPrice: BigNumber;
|
|
16
|
-
};
|
|
17
13
|
export interface GasPriceFeed {
|
|
18
14
|
(provider: PublicClient<Transport, Chain>, chainId: number): Promise<InternalGasPriceEstimate>;
|
|
19
15
|
}
|
|
@@ -21,4 +17,3 @@ export declare function isEVMGasPrice(gasPrice: GasPriceEstimate): gasPrice is E
|
|
|
21
17
|
export declare function isType0Gas(gas: EvmGasPriceEstimate): boolean;
|
|
22
18
|
export declare function isType2Gas(gas: EvmGasPriceEstimate): boolean;
|
|
23
19
|
export declare function isSVMGasPrice(gasPrice: GasPriceEstimate): gasPrice is SvmGasPriceEstimate;
|
|
24
|
-
export declare function isTVMGasPrice(gasPrice: GasPriceEstimate): gasPrice is TvmGasPriceEstimate;
|
|
@@ -13,8 +13,4 @@ export function isSVMGasPrice(gasPrice) {
|
|
|
13
13
|
var _a = gasPrice, baseFee = _a.baseFee, microLamportsPerComputeUnit = _a.microLamportsPerComputeUnit;
|
|
14
14
|
return isDefined(baseFee) && isDefined(microLamportsPerComputeUnit);
|
|
15
15
|
}
|
|
16
|
-
export function isTVMGasPrice(gasPrice) {
|
|
17
|
-
var _a = gasPrice, energyPrice = _a.energyPrice, bandwidthPrice = _a.bandwidthPrice;
|
|
18
|
-
return isDefined(energyPrice) && isDefined(bandwidthPrice);
|
|
19
|
-
}
|
|
20
16
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/gasPriceOracle/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/gasPriceOracle/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAmBxD,MAAM,UAAU,aAAa,CAAC,QAA0B;IAChD,IAAA,KAAyC,QAA+B,EAAtE,YAAY,kBAAA,EAAE,oBAAoB,0BAAoC,CAAC;IAC/E,OAAO,SAAS,CAAC,YAAY,CAAC,IAAI,SAAS,CAAC,oBAAoB,CAAC,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAwB;IACjD,OAAO,GAAG,CAAC,oBAAoB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAwB;IACjD,OAAO,GAAG,CAAC,oBAAoB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,QAA0B;IAChD,IAAA,KAA2C,QAA+B,EAAxE,OAAO,aAAA,EAAE,2BAA2B,iCAAoC,CAAC;IACjF,OAAO,SAAS,CAAC,OAAO,CAAC,IAAI,SAAS,CAAC,2BAA2B,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -4,7 +4,6 @@ import { QueryBase } from "./baseQuery";
|
|
|
4
4
|
import { SVMProvider as svmProvider } from "../../arch/svm";
|
|
5
5
|
import { Logger } from "../relayFeeCalculator";
|
|
6
6
|
import { SvmQuery } from "./svmQuery";
|
|
7
|
-
import { TvmQuery } from "./tvmQuery";
|
|
8
7
|
export declare class QueryBase__factory {
|
|
9
8
|
static create(chainId: number, provider: providers.Provider | svmProvider | TronWeb, symbolMapping?: {
|
|
10
9
|
ACX: {
|
|
@@ -408,5 +407,5 @@ export declare class QueryBase__factory {
|
|
|
408
407
|
addresses: {};
|
|
409
408
|
coingeckoId: string;
|
|
410
409
|
};
|
|
411
|
-
}, spokePoolAddress?: string | undefined, relayerAddress?: import("../../utils").Address, coingeckoProApiKey?: string, logger?: Logger, coingeckoBaseCurrency?: string): QueryBase | SvmQuery
|
|
410
|
+
}, spokePoolAddress?: string | undefined, relayerAddress?: import("../../utils").Address, coingeckoProApiKey?: string, logger?: Logger, coingeckoBaseCurrency?: string): QueryBase | SvmQuery;
|
|
412
411
|
}
|
|
@@ -4,12 +4,11 @@ import { CHAIN_IDs, TOKEN_SYMBOLS_MAP } from "@across-protocol/constants";
|
|
|
4
4
|
import { getDeployedAddress } from "@across-protocol/contracts";
|
|
5
5
|
import { asL2Provider } from "@eth-optimism/sdk";
|
|
6
6
|
import { CUSTOM_GAS_TOKENS } from "../../constants";
|
|
7
|
-
import { chainIsEvm, chainIsOPStack, isDefined, chainIsSvm,
|
|
7
|
+
import { chainIsEvm, chainIsOPStack, isDefined, chainIsSvm, SvmAddress } from "../../utils";
|
|
8
8
|
import { QueryBase } from "./baseQuery";
|
|
9
9
|
import { DEFAULT_LOGGER, getDefaultRelayer } from "../relayFeeCalculator";
|
|
10
10
|
import { CustomGasTokenQueries } from "./customGasToken";
|
|
11
11
|
import { SvmQuery } from "./svmQuery";
|
|
12
|
-
import { TvmQuery } from "./tvmQuery";
|
|
13
12
|
/**
|
|
14
13
|
* Some chains have a fixed gas price that is applied to the gas estimates. We should override
|
|
15
14
|
* the gas markup for these chains.
|
|
@@ -48,10 +47,6 @@ var QueryBase__factory = /** @class */ (function () {
|
|
|
48
47
|
assert(relayerAddress.isSVM());
|
|
49
48
|
return new SvmQuery(provider, symbolMapping, SvmAddress.from(spokePoolAddress), relayerAddress, logger, coingeckoProApiKey, fixedGasPrice[chainId], coingeckoBaseCurrency);
|
|
50
49
|
}
|
|
51
|
-
if (chainIsTvm(chainId)) {
|
|
52
|
-
assert(relayerAddress.isEVM());
|
|
53
|
-
return new TvmQuery(provider, symbolMapping, spokePoolAddress, relayerAddress, logger, coingeckoProApiKey, fixedGasPrice[chainId], coingeckoBaseCurrency);
|
|
54
|
-
}
|
|
55
50
|
// For OPStack chains, we need to wrap the provider in an L2Provider
|
|
56
51
|
provider = chainIsOPStack(chainId)
|
|
57
52
|
? asL2Provider(provider)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../../src/relayFeeCalculator/chain-queries/factory.ts"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../../../src/relayFeeCalculator/chain-queries/factory.ts"],"names":[],"mappings":";AAAA,OA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AAC,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC;YAC/B,OAAO,IAAI,qBAAqB,CAAC;gBAC/B,aAAa,EAAE;oBACb,QAA8B;oBAC9B,aAAa;oBACb,gBAAgB;oBAChB,cAAc;oBACd,MAAM;oBACN,kBAAkB;oBAClB,aAAa,CAAC,OAAO,CAAC;oBACtB,KAAK;iBACN;gBACD,oBAAoB,sBAAA;aACrB,CAAC,CAAC;QACL,CAAC;QACD,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YACxB,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC;YAC/B,OAAO,IAAI,QAAQ,CACjB,QAAuB,EACvB,aAAa,EACb,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,EACjC,cAAc,EACd,MAAM,EACN,kBAAkB,EAClB,aAAa,CAAC,OAAO,CAAC,EACtB,qBAAqB,CACtB,CAAC;QACJ,CAAC;QAED,oEAAoE;QACpE,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC;YAChC,CAAC,CAAC,YAAY,CAAC,QAA8B,CAAC;YAC9C,CAAC,CAAE,QAA+B,CAAC;QAErC,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC;QAC/B,OAAO,IAAI,SAAS,CAClB,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,MAAM,EACN,kBAAkB,EAClB,aAAa,CAAC,OAAO,CAAC,EACtB,qBAAqB,CACtB,CAAC;IACJ,CAAC;IACH,yBAAC;AAAD,CAAC,AA7DD,IA6DC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/relayFeeCalculator/chain-queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/relayFeeCalculator/chain-queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { getGasPriceEstimate, GasPriceEstimateOptions } from "./oracle";
|
|
2
|
-
export { GasPriceEstimate, EvmGasPriceEstimate, SvmGasPriceEstimate
|
|
2
|
+
export { GasPriceEstimate, EvmGasPriceEstimate, SvmGasPriceEstimate } from "./types";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/gasPriceOracle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/gasPriceOracle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Transport } from "viem";
|
|
2
2
|
import { BigNumber } from "../utils";
|
|
3
3
|
import { SVMProvider as SolanaProvider } from "../arch/svm";
|
|
4
|
-
import {
|
|
5
|
-
import { EvmGasPriceEstimate, SvmGasPriceEstimate, TvmGasPriceEstimate } from "./types";
|
|
4
|
+
import { EvmGasPriceEstimate, SvmGasPriceEstimate } from "./types";
|
|
6
5
|
import { EvmProvider } from "../arch/evm/types";
|
|
7
6
|
export interface GasPriceEstimateOptions {
|
|
8
7
|
baseFeeMultiplier: BigNumber;
|
|
@@ -21,5 +20,4 @@ export interface FeeHistoryOptions {
|
|
|
21
20
|
}
|
|
22
21
|
export declare function getGasPriceEstimate(provider: EvmProvider, opts?: Partial<GasPriceEstimateOptions>): Promise<EvmGasPriceEstimate>;
|
|
23
22
|
export declare function getGasPriceEstimate(provider: SolanaProvider, opts?: Partial<GasPriceEstimateOptions>): Promise<SvmGasPriceEstimate>;
|
|
24
|
-
export declare function getGasPriceEstimate(provider: TronWeb, opts?: Partial<GasPriceEstimateOptions>): Promise<TvmGasPriceEstimate>;
|
|
25
23
|
//# sourceMappingURL=oracle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oracle.d.ts","sourceRoot":"","sources":["../../../../src/gasPriceOracle/oracle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAGjC,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"oracle.d.ts","sourceRoot":"","sources":["../../../../src/gasPriceOracle/oracle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAGjC,OAAO,EAAE,SAAS,EAA2D,MAAM,UAAU,CAAC;AAC9F,OAAO,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAoB,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAOrF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,WAAW,uBAAuB;IAEtC,iBAAiB,EAAE,SAAS,CAAC;IAE7B,qBAAqB,EAAE,SAAS,CAAC;IAEjC,cAAc,EAAE,OAAO,CAAC;IAExB,OAAO,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAEtC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,CAAC;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,SAAS,CAAC;CAC7B;AAUD,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,WAAW,EACrB,IAAI,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,GACtC,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAGhC,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,cAAc,EACxB,IAAI,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,GACtC,OAAO,CAAC,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Chain, type Transport, PublicClient, FeeValuesEIP1559 } from "viem";
|
|
2
2
|
import { BigNumber } from "../utils";
|
|
3
3
|
export type InternalGasPriceEstimate = FeeValuesEIP1559;
|
|
4
|
-
export type GasPriceEstimate = EvmGasPriceEstimate | SvmGasPriceEstimate
|
|
4
|
+
export type GasPriceEstimate = EvmGasPriceEstimate | SvmGasPriceEstimate;
|
|
5
5
|
export type EvmGasPriceEstimate = {
|
|
6
6
|
maxFeePerGas: BigNumber;
|
|
7
7
|
maxPriorityFeePerGas: BigNumber;
|
|
@@ -10,10 +10,6 @@ export type SvmGasPriceEstimate = {
|
|
|
10
10
|
baseFee: BigNumber;
|
|
11
11
|
microLamportsPerComputeUnit: BigNumber;
|
|
12
12
|
};
|
|
13
|
-
export type TvmGasPriceEstimate = {
|
|
14
|
-
energyPrice: BigNumber;
|
|
15
|
-
bandwidthPrice: BigNumber;
|
|
16
|
-
};
|
|
17
13
|
export interface GasPriceFeed {
|
|
18
14
|
(provider: PublicClient<Transport, Chain>, chainId: number): Promise<InternalGasPriceEstimate>;
|
|
19
15
|
}
|
|
@@ -21,5 +17,4 @@ export declare function isEVMGasPrice(gasPrice: GasPriceEstimate): gasPrice is E
|
|
|
21
17
|
export declare function isType0Gas(gas: EvmGasPriceEstimate): boolean;
|
|
22
18
|
export declare function isType2Gas(gas: EvmGasPriceEstimate): boolean;
|
|
23
19
|
export declare function isSVMGasPrice(gasPrice: GasPriceEstimate): gasPrice is SvmGasPriceEstimate;
|
|
24
|
-
export declare function isTVMGasPrice(gasPrice: GasPriceEstimate): gasPrice is TvmGasPriceEstimate;
|
|
25
20
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/gasPriceOracle/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,SAAS,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAClF,OAAO,EAAE,SAAS,EAAqB,MAAM,UAAU,CAAC;AAExD,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AACxD,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,GAAG,mBAAmB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/gasPriceOracle/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,SAAS,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAClF,OAAO,EAAE,SAAS,EAAqB,MAAM,UAAU,CAAC;AAExD,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AACxD,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AAEzE,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,SAAS,CAAC;IACxB,oBAAoB,EAAE,SAAS,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,SAAS,CAAC;IACnB,2BAA2B,EAAE,SAAS,CAAC;CACxC,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,CAAC,QAAQ,EAAE,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAChG;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,gBAAgB,GAAG,QAAQ,IAAI,mBAAmB,CAGzF;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,mBAAmB,GAAG,OAAO,CAE5D;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,mBAAmB,GAAG,OAAO,CAE5D;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,gBAAgB,GAAG,QAAQ,IAAI,mBAAmB,CAGzF"}
|
|
@@ -4,7 +4,6 @@ import { QueryBase } from "./baseQuery";
|
|
|
4
4
|
import { SVMProvider as svmProvider } from "../../arch/svm";
|
|
5
5
|
import { Logger } from "../relayFeeCalculator";
|
|
6
6
|
import { SvmQuery } from "./svmQuery";
|
|
7
|
-
import { TvmQuery } from "./tvmQuery";
|
|
8
7
|
export declare class QueryBase__factory {
|
|
9
8
|
static create(chainId: number, provider: providers.Provider | svmProvider | TronWeb, symbolMapping?: {
|
|
10
9
|
ACX: {
|
|
@@ -408,6 +407,6 @@ export declare class QueryBase__factory {
|
|
|
408
407
|
addresses: {};
|
|
409
408
|
coingeckoId: string;
|
|
410
409
|
};
|
|
411
|
-
}, spokePoolAddress?: string | undefined, relayerAddress?: import("../../utils").Address, coingeckoProApiKey?: string, logger?: Logger, coingeckoBaseCurrency?: string): QueryBase | SvmQuery
|
|
410
|
+
}, spokePoolAddress?: string | undefined, relayerAddress?: import("../../utils").Address, coingeckoProApiKey?: string, logger?: Logger, coingeckoBaseCurrency?: string): QueryBase | SvmQuery;
|
|
412
411
|
}
|
|
413
412
|
//# sourceMappingURL=factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../../src/relayFeeCalculator/chain-queries/factory.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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAoB,EACjC,gBAAgB,qBAA2C,EAC3D,cAAc,gCAA6B,EAC3C,kBAAkB,CAAC,EAAE,MAAM,EAC3B,MAAM,GAAE,MAAuB,EAC/B,qBAAqB,SAAQ,GAC5B,SAAS,GAAG,QAAQ;CAmDxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/relayFeeCalculator/chain-queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/relayFeeCalculator/chain-queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { getGasPriceEstimate, GasPriceEstimateOptions } from "./oracle";
|
|
2
|
-
export { GasPriceEstimate, EvmGasPriceEstimate, SvmGasPriceEstimate
|
|
2
|
+
export { GasPriceEstimate, EvmGasPriceEstimate, SvmGasPriceEstimate } from "./types";
|