From f32732db1c27dce1ab98f0ecd6553adc221b94d7 Mon Sep 17 00:00:00 2001 From: Amir Bandeali Date: Tue, 20 Aug 2019 20:02:03 -0700 Subject: [PATCH] Add TransactionGasPriceError rich revert class --- packages/order-utils/src/exchange_revert_errors.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/order-utils/src/exchange_revert_errors.ts b/packages/order-utils/src/exchange_revert_errors.ts index 3d8c02a21c..cd61141c5e 100644 --- a/packages/order-utils/src/exchange_revert_errors.ts +++ b/packages/order-utils/src/exchange_revert_errors.ts @@ -213,6 +213,20 @@ export class TransactionExecutionError extends RevertError { } } +export class TransactionGasPriceError extends RevertError { + constructor(transactionHash?: string, actualGasPrice?: BigNumber, requiredGasPrice?: BigNumber) { + super( + 'TransactionGasPriceError', + 'TransactionGasPriceError(bytes32 transactionHash, uint256 actualGasPrice, uint256 requiredGasPrice)', + { + transactionHash, + actualGasPrice, + requiredGasPrice, + }, + ); + } +} + export class IncompleteFillError extends RevertError { constructor( error?: IncompleteFillErrorCode,