@0x/contracts-staking: Add rich reverts.

`@0x/utils`: Add `LibFixedMath` `RevertError` types.
`@0x/order-utils`: Add `InvalidCobbDouglasAlphaerror` `RevertError` type.
This commit is contained in:
Lawrence Forman
2019-08-27 15:16:59 -04:00
committed by Lawrence Forman
parent a09cd03ce6
commit 7b5e3dab17
15 changed files with 420 additions and 20 deletions

View File

@@ -195,6 +195,16 @@ export class PoolAlreadyExistsError extends RevertError {
}
}
export class InvalidCobbDouglasAlphaError extends RevertError {
constructor(numerator: BigNumber | number | string, denominator: BigNumber | number | string) {
super(
'InvalidCobbDouglasAlphaError',
'InvalidCobbDouglasAlphaError(uint256 numerator, uint256 denominator)',
{ numerator, denominator },
);
}
}
const types = [
MiscalculatedRewardsError,
OnlyCallableByExchangeError,
@@ -220,6 +230,7 @@ const types = [
AmountExceedsBalanceOfPoolError,
OperatorShareMustBeBetween0And100Error,
PoolAlreadyExistsError,
InvalidCobbDouglasAlphaError,
];
// Register the types we've defined.