Compare commits
1 Commits
c9f43ff292
...
b65b0ee16b
| Author | SHA1 | Date | |
|---|---|---|---|
| b65b0ee16b |
@ -283,18 +283,9 @@ export abstract class TornadoFeeOracle implements ITornadoFeeOracle {
|
|||||||
tokenPriceInEth,
|
tokenPriceInEth,
|
||||||
predefinedGasLimit,
|
predefinedGasLimit,
|
||||||
predefinedGasPrice,
|
predefinedGasPrice,
|
||||||
bumpGasLimitPercent,
|
|
||||||
bumpGasPricePercent,
|
|
||||||
}: GetWithdrawalFeeViaRelayerInput): Promise<HexadecimalStringifiedNumber> {
|
}: GetWithdrawalFeeViaRelayerInput): Promise<HexadecimalStringifiedNumber> {
|
||||||
const relayerFee = this.calculateRelayerFeeInWei(relayerFeePercent, amount, decimals);
|
const relayerFee = this.calculateRelayerFeeInWei(relayerFeePercent, amount, decimals);
|
||||||
const { gasPrice, gasLimit } = await this.getGasParams({
|
const { gasPrice, gasLimit } = await this.getGasParams({ tx, txType, predefinedGasLimit, predefinedGasPrice });
|
||||||
tx,
|
|
||||||
txType,
|
|
||||||
predefinedGasLimit,
|
|
||||||
predefinedGasPrice,
|
|
||||||
bumpGasLimitPercent,
|
|
||||||
bumpGasPricePercent,
|
|
||||||
});
|
|
||||||
const gasCosts = BigNumber.from(gasPrice).mul(gasLimit);
|
const gasCosts = BigNumber.from(gasPrice).mul(gasLimit);
|
||||||
|
|
||||||
const hasTokenPrice =
|
const hasTokenPrice =
|
||||||
|
|||||||
@ -117,6 +117,4 @@ export type GetWithdrawalFeeViaRelayerInput = {
|
|||||||
tokenPriceInEth?: HexadecimalStringifiedNumber | string; // Token (currency) price in ETH wei, if withdrawing non-native currency
|
tokenPriceInEth?: HexadecimalStringifiedNumber | string; // Token (currency) price in ETH wei, if withdrawing non-native currency
|
||||||
predefinedGasPrice?: HexadecimalStringifiedNumber; // Predefined gas price for withdrawal tx (wont be calculated again in function)
|
predefinedGasPrice?: HexadecimalStringifiedNumber; // Predefined gas price for withdrawal tx (wont be calculated again in function)
|
||||||
predefinedGasLimit?: number; // Predefined gas limit for withdrawal tx (wont be calculated again in function)
|
predefinedGasLimit?: number; // Predefined gas limit for withdrawal tx (wont be calculated again in function)
|
||||||
bumpGasLimitPercent?: number; // Gas limit bump percent to prioritize transaction (recenlty used)
|
|
||||||
bumpGasPricePercent?: number; // Gas price bump percent to prioritize transaction (rarely used)
|
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user