Add TransactionGasPriceError to LibExchangeRichErrors
This commit is contained in:
@@ -131,6 +131,10 @@ library LibExchangeRichErrors {
|
||||
// bytes4(keccak256("TransactionExecutionError(bytes32,bytes)"))
|
||||
bytes4 internal constant TRANSACTION_EXECUTION_ERROR_SELECTOR =
|
||||
0x20d11f61;
|
||||
|
||||
// bytes4(keccak256("TransactionGasPriceError(bytes32,unt256,uint256)"))
|
||||
bytes4 internal constant TRANSACTION_GAS_PRICE_ERROR_SELECTOR =
|
||||
0xa26dac09;
|
||||
|
||||
// bytes4(keccak256("IncompleteFillError(uint8,uint256,uint256)"))
|
||||
bytes4 internal constant INCOMPLETE_FILL_ERROR_SELECTOR =
|
||||
@@ -293,6 +297,14 @@ library LibExchangeRichErrors {
|
||||
return BATCH_MATCH_ORDERS_ERROR_SELECTOR;
|
||||
}
|
||||
|
||||
function TransactionGasPriceErrorSelector()
|
||||
internal
|
||||
pure
|
||||
returns (bytes4)
|
||||
{
|
||||
return TRANSACTION_GAS_PRICE_ERROR_SELECTOR;
|
||||
}
|
||||
|
||||
function BatchMatchOrdersError(
|
||||
BatchMatchOrdersErrorCodes errorCode
|
||||
)
|
||||
@@ -581,6 +593,23 @@ library LibExchangeRichErrors {
|
||||
);
|
||||
}
|
||||
|
||||
function TransactionGasPriceError(
|
||||
bytes32 transactionHash,
|
||||
uint256 actualGasPrice,
|
||||
uint256 requiredGasPrice
|
||||
)
|
||||
internal
|
||||
pure
|
||||
returns (bytes memory)
|
||||
{
|
||||
return abi.encodeWithSelector(
|
||||
TRANSACTION_GAS_PRICE_ERROR_SELECTOR,
|
||||
transactionHash,
|
||||
actualGasPrice,
|
||||
requiredGasPrice
|
||||
);
|
||||
}
|
||||
|
||||
function IncompleteFillError(
|
||||
IncompleteFillErrorCode errorCode,
|
||||
uint256 expectedAssetFillAmount,
|
||||
|
||||
Reference in New Issue
Block a user