Compare commits
1 Commits
b65b0ee16b
...
c9f43ff292
| Author | SHA1 | Date | |
|---|---|---|---|
| c9f43ff292 |
@ -283,9 +283,18 @@ export abstract class TornadoFeeOracle implements ITornadoFeeOracle {
|
||||
tokenPriceInEth,
|
||||
predefinedGasLimit,
|
||||
predefinedGasPrice,
|
||||
bumpGasLimitPercent,
|
||||
bumpGasPricePercent,
|
||||
}: GetWithdrawalFeeViaRelayerInput): Promise<HexadecimalStringifiedNumber> {
|
||||
const relayerFee = this.calculateRelayerFeeInWei(relayerFeePercent, amount, decimals);
|
||||
const { gasPrice, gasLimit } = await this.getGasParams({ tx, txType, predefinedGasLimit, predefinedGasPrice });
|
||||
const { gasPrice, gasLimit } = await this.getGasParams({
|
||||
tx,
|
||||
txType,
|
||||
predefinedGasLimit,
|
||||
predefinedGasPrice,
|
||||
bumpGasLimitPercent,
|
||||
bumpGasPricePercent,
|
||||
});
|
||||
const gasCosts = BigNumber.from(gasPrice).mul(gasLimit);
|
||||
|
||||
const hasTokenPrice =
|
||||
|
||||
@ -117,4 +117,6 @@ export type GetWithdrawalFeeViaRelayerInput = {
|
||||
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)
|
||||
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