Add public field version
to oracle class
This commit is contained in:
parent
9ef88948d2
commit
394d6cab5c
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tornado/tornado-oracles",
|
||||
"version": "3.1.0",
|
||||
"version": "3.2.0",
|
||||
"description": "Oracles for Tornado-specific transactions & actions",
|
||||
"main": "./lib/index.js",
|
||||
"types": "./lib/index.d.ts",
|
||||
|
@ -23,6 +23,7 @@ export abstract class TornadoFeeOracle implements ITornadoFeeOracle {
|
||||
protected provider: JsonRpcProvider;
|
||||
|
||||
public constructor(
|
||||
public version: 4 | 5,
|
||||
protected chainId: ChainId,
|
||||
rpcUrl: string,
|
||||
protected oracle: GasPriceOracle,
|
||||
|
@ -13,7 +13,7 @@ export class TornadoFeeOracleV4 extends TornadoFeeOracle implements ITornadoFeeO
|
||||
};
|
||||
const gasPriceOracle = new GasPriceOracle(oracleConfig);
|
||||
|
||||
super(chainId, rpcUrl, gasPriceOracle);
|
||||
super(4, chainId, rpcUrl, gasPriceOracle);
|
||||
}
|
||||
|
||||
async getGasLimit(tx?: TransactionData, type: TxType = 'other', bumpPercent: number = 0): Promise<number> {
|
||||
|
@ -26,7 +26,7 @@ export class TornadoFeeOracleV5 extends TornadoFeeOracle implements ITornadoFeeO
|
||||
};
|
||||
const gasPriceOracle = new GasPriceOracle(oracleConfig);
|
||||
|
||||
super(chainId, rpcUrl, gasPriceOracle);
|
||||
super(5, chainId, rpcUrl, gasPriceOracle);
|
||||
|
||||
this.fallbackFeeOracle = new TornadoFeeOracleV4(chainId, rpcUrl, defaultGasPrices);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user