@0x:contracts-utils Added RichErrors to LibAddressArray
This commit is contained in:
committed by
Amir Bandeali
parent
d3db2dcfbb
commit
da38285046
@@ -1,3 +1,4 @@
|
||||
import * as LibAddressArrayRevertErrors from './lib_address_array_revert_errors';
|
||||
import * as LibBytesRevertErrors from './lib_bytes_revert_errors';
|
||||
import * as OwnableRevertErrors from './ownable_revert_errors';
|
||||
import * as SafeMathRevertErrors from './safe_math_revert_errors';
|
||||
@@ -29,4 +30,4 @@ export {
|
||||
AnyRevertError,
|
||||
} from './revert_error';
|
||||
|
||||
export { LibBytesRevertErrors, OwnableRevertErrors, SafeMathRevertErrors };
|
||||
export { LibAddressArrayRevertErrors, LibBytesRevertErrors, OwnableRevertErrors, SafeMathRevertErrors };
|
||||
|
||||
18
packages/utils/src/lib_address_array_revert_errors.ts
Normal file
18
packages/utils/src/lib_address_array_revert_errors.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { BigNumber } from './configured_bignumber';
|
||||
import { RevertError } from './revert_error';
|
||||
|
||||
export class MismanagedMemoryError extends RevertError {
|
||||
constructor(freeMemPtr?: BigNumber, addressArrayEndPtr?: BigNumber) {
|
||||
super(
|
||||
'MismanagedMemoryError',
|
||||
'MismanagedMemoryError(uint256 freeMemPtr, uint256 addressArrayEndPtr)',
|
||||
{
|
||||
freeMemPtr,
|
||||
addressArrayEndPtr,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Register the InvalidByteOperationError type
|
||||
RevertError.registerType(MismanagedMemoryError);
|
||||
Reference in New Issue
Block a user