Add TransactionInvalidContextError and remove NO_REENTRANCY errorCode
This commit is contained in:
parent
7b96fa8d76
commit
44753bb168
@ -53,7 +53,6 @@ library LibExchangeRichErrors {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum TransactionErrorCodes {
|
enum TransactionErrorCodes {
|
||||||
NO_REENTRANCY,
|
|
||||||
ALREADY_EXECUTED,
|
ALREADY_EXECUTED,
|
||||||
EXPIRED
|
EXPIRED
|
||||||
}
|
}
|
||||||
@ -136,6 +135,10 @@ library LibExchangeRichErrors {
|
|||||||
bytes4 internal constant TRANSACTION_GAS_PRICE_ERROR_SELECTOR =
|
bytes4 internal constant TRANSACTION_GAS_PRICE_ERROR_SELECTOR =
|
||||||
0xa26dac09;
|
0xa26dac09;
|
||||||
|
|
||||||
|
// bytes4(keccak256("TransactionInvalidContextError(bytes32,address)"))
|
||||||
|
bytes4 internal constant TRANSACTION_INVALID_CONTEXT_ERROR_SELECTOR =
|
||||||
|
0xdec4aedf;
|
||||||
|
|
||||||
// bytes4(keccak256("IncompleteFillError(uint8,uint256,uint256)"))
|
// bytes4(keccak256("IncompleteFillError(uint8,uint256,uint256)"))
|
||||||
bytes4 internal constant INCOMPLETE_FILL_ERROR_SELECTOR =
|
bytes4 internal constant INCOMPLETE_FILL_ERROR_SELECTOR =
|
||||||
0x18e4b141;
|
0x18e4b141;
|
||||||
@ -610,6 +613,21 @@ library LibExchangeRichErrors {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function TransactionInvalidContextError(
|
||||||
|
bytes32 transactionHash,
|
||||||
|
address currentContextAddress
|
||||||
|
)
|
||||||
|
internal
|
||||||
|
pure
|
||||||
|
returns (bytes memory)
|
||||||
|
{
|
||||||
|
return abi.encodeWithSelector(
|
||||||
|
TRANSACTION_INVALID_CONTEXT_ERROR_SELECTOR,
|
||||||
|
transactionHash,
|
||||||
|
currentContextAddress
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function IncompleteFillError(
|
function IncompleteFillError(
|
||||||
IncompleteFillErrorCode errorCode,
|
IncompleteFillErrorCode errorCode,
|
||||||
uint256 expectedAssetFillAmount,
|
uint256 expectedAssetFillAmount,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user