65af25e76bReturn zero value from calculateRefundInETH function if called on incorrect chain or with native token or tokenSymbol is invalid & bump package version to 3.3.0Theo2023-09-06 15:43:31 -07:00
2ce8cafdbdCalculate refund on user side only if no value provided (strictly undefined)Theo2023-09-06 14:21:12 -07:00
394d6cab5cAdd public field version to oracle classTheo2023-09-06 14:07:35 -07:00
9ef88948d2Calculate refund in calculateWithdrawalFeeViaRelayer, if correct value didn't provided when calculating for user_withdrawal transaction type & bump to 3.1.0Theo2023-09-04 13:50:35 -07:00
be7f911a17Update package to version 3.0.0: - Simplify getGasParams function by including additional L1 fee in gasLimit - Make calculateRefund functions non-async by providing gas price (its ok, because refund needs to be calculated only on user side, where gas price is known) - Allow passing to calculateWithdrawalFeeViaRelayer function predefined gas price and gas limit to not refetch/recalculate those values - Pass arguments as objects to functions with many optional parametersTheo2023-09-04 13:26:46 -07:00
ae9b15b7edSet minPriority for BSC as 3 GWEI to not underprice transactionTheo2023-08-30 08:10:43 -07:00
0d3ea02015Bump library version to 2.0.0: - Fix BSC gas price estimation: use 'instant' price for gas instead of 'fast', because 'fast' is about 1 GWEI, and 'instant' about 3 GWEI, and 'fast' transaction can take more than 2-3 hours to execute - Remove unnecessary parameter type in all functions that used to get gas price(-s)Theo2023-08-28 09:51:21 -07:00
90471e0073Fix gas limit function in V4 oracle: if transaction type not specified, but transaction data provided, need to bump estimated limitTheo2023-08-28 09:05:53 -07:00
c3bfb381b7Fix bump function: round to lower when BigNumber stores float value before converting to ethers BigNumberTheo2023-08-28 09:01:19 -07:00
342c34b07aFix gas price estimation for V5 oracle: now, if bumpPercent not specified, using bumpPercent depending on tx type and chain ID & bump package version to 1.4.0Theo2023-08-28 03:44:25 -07:00
57c24e21ebAdd parameters to modify gas price bump percent and gas limit bump percent in getGas and getGasParams functionsTheo2023-08-28 03:41:50 -07:00
583f3e90ddFix JSDoc typings for getGasLimit function in parent fee oracle abstract classTheo2023-08-27 08:28:39 -07:00
fb772fa300Add Math.ceil while calculating relayer fee percent, because if relayer has 0.07% fee, in JS multiplication result of 0.07 * 1e10 is 700000000.0000001 & bump version to 1.3.2Theo2023-08-27 05:00:40 -07:00
42b57f8734Bump gas limit for any transaction type in V4 fee oracle, if bump percent provided & change lib version to 1.3.1Theo2023-08-27 00:41:05 -07:00
a0476b0e34Add function to get all gas params - gas price, gas limit and L1 fee, if exists, in one object & bump lib version to 1.3.0Theo2023-08-26 09:56:29 -07:00
de369f405cSpeed up getGas function via Promise.all & bump version to 1.2.2Theo2023-08-25 07:52:23 -07:00
4cdd5c7538Fix typings & bump version to 1.2.1Theo2023-08-23 13:16:37 -07:00
76a0ccea68Fix refund calculation: we need to use different gas limits for each ERC tokens & bump lib version to 1.2.0Theo2023-08-22 11:56:38 -07:00
40bf17177bSet function to get optimism l1 fee as public & bump version to 1.1.0Theo2023-08-22 11:23:25 -07:00
3c1352ea41Update to stable version 1.0.0:Theo2023-08-22 06:39:59 -07:00
1ace796f8aDon't prettify service files, abis and autogenerated contracts by typechainTheo2023-08-22 06:23:12 -07:00
0aa15627f4Add fallback from feeOracleV5 to V4 in getGasLimit method, if no tx object provided & bump package version to 0.3.0Theo2023-08-21 09:30:24 -07:00
96616d8cf4Create public function in feeOracle to calculate refund in selected token & change typingsTheo2023-08-21 09:27:16 -07:00
0d1ac74b11Change node version to 14.21.3Theo2023-08-21 09:23:12 -07:00
2e3273b7bcStylistic changes in READMETheo2023-08-21 09:18:49 -07:00
c63e6a320fAdd getter to TokenPriceOracle for default token prices & bump version to 0.2.3Theo2023-08-20 11:49:12 -07:00
f5244ae722Update bump percent for V4 relayer withdrawals & bump version to 0.2.2Theo2023-08-20 09:55:49 -07:00
03e6af5614Fix tx object in getGas method & bump version to 0.2.1Theo2023-08-19 10:55:41 -07:00
85b057fbedAdd specific Tornado transaction type - relayer_withdrawal_check_v4 - for backwards compatibility with old gas calculation algorithmTheo2023-08-19 10:44:07 -07:00
6bff5b560fAdd publish config for npm Gitea registryTheo2023-08-18 23:35:29 -07:00
4a1edeaef9Bump version to 0.1.1 & fix repo linkTheo2023-08-18 23:02:24 -07:00
c50caf3a48Add readme with examplesTheo2023-08-18 23:01:33 -07:00
2da3bf094fAdd function to get gas price as hex stringTheo2023-08-18 23:01:18 -07:00