Updated the erc1155 tests to expect RichErrors

This commit is contained in:
James Towle
2019-06-06 12:47:21 -07:00
committed by Amir Bandeali
parent 6e4b6929d2
commit b3da4bb5b7
4 changed files with 80 additions and 23 deletions

View File

@@ -0,0 +1,32 @@
import { BigNumber } from './configured_bignumber';
import { RevertError } from './revert_error';
// tslint:disable:max-classes-per-file
export class Uint256OverflowError extends RevertError {
constructor(a?: BigNumber | number | string, b?: BigNumber | number | string) {
super('Uint256OverflowError', 'Uint256OverflowError(uint256 a, uint256 b)', {
a,
b,
});
}
}
export class Uint256UnderflowError extends RevertError {
constructor(a?: BigNumber | number | string, b?: BigNumber | number | string) {
super('Uint256UnderflowError', 'Uint256UnderflowError(uint256 a, uint256 b)', {
a,
b,
});
}
}
const types = [
Uint256OverflowError,
Uint256UnderflowError,
]
// Register the types we've defined.
for (const type of types) {
RevertError.registerType(type);
}