Compare commits
1 Commits
bef587cc1a
...
c27d5e638c
| Author | SHA1 | Date | |
|---|---|---|---|
| c27d5e638c |
@ -19,14 +19,11 @@ import { TornadoFeeOracleV5 } from './feeOracleV5';
|
|||||||
*/
|
*/
|
||||||
export class TornadoFeeOracleV6 extends TornadoFeeOracle implements ITornadoFeeOracle {
|
export class TornadoFeeOracleV6 extends TornadoFeeOracle implements ITornadoFeeOracle {
|
||||||
private fallbackFeeOracle: TornadoFeeOracleV5;
|
private fallbackFeeOracle: TornadoFeeOracleV5;
|
||||||
// Override value for BSC (Since old relayers use static value of 3.3 gwei)
|
|
||||||
public overrideGasPrice?: GasPriceParams;
|
|
||||||
|
|
||||||
public constructor(chainId: number, rpcUrl: string, overrideGasPrice?: GasPriceParams) {
|
public constructor(chainId: number, rpcUrl: string) {
|
||||||
super(6, chainId, rpcUrl);
|
super(6, chainId, rpcUrl);
|
||||||
|
|
||||||
this.fallbackFeeOracle = new TornadoFeeOracleV5(chainId, rpcUrl);
|
this.fallbackFeeOracle = new TornadoFeeOracleV5(chainId, rpcUrl);
|
||||||
this.overrideGasPrice = overrideGasPrice;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,9 +46,6 @@ export class TornadoFeeOracleV6 extends TornadoFeeOracle implements ITornadoFeeO
|
|||||||
* (Can spike 12.5% per block accoring to the EIP-1559 metrics https://metamask.io/1559/)
|
* (Can spike 12.5% per block accoring to the EIP-1559 metrics https://metamask.io/1559/)
|
||||||
*/
|
*/
|
||||||
async getGasPriceParams(speed?: LegacyGasPriceKey, bumpPercent?: number): Promise<GasPriceParams> {
|
async getGasPriceParams(speed?: LegacyGasPriceKey, bumpPercent?: number): Promise<GasPriceParams> {
|
||||||
if (this.overrideGasPrice) {
|
|
||||||
return this.overrideGasPrice;
|
|
||||||
}
|
|
||||||
if (typeof bumpPercent === 'undefined') {
|
if (typeof bumpPercent === 'undefined') {
|
||||||
bumpPercent = this.chainId === ChainId.BSC ? undefined : 30;
|
bumpPercent = this.chainId === ChainId.BSC ? undefined : 30;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user