@0x/contracts-staking: Add rich reverts.
`@0x/utils`: Add `LibFixedMath` `RevertError` types. `@0x/order-utils`: Add `InvalidCobbDouglasAlphaerror` `RevertError` type.
This commit is contained in:
committed by
Lawrence Forman
parent
a09cd03ce6
commit
7b5e3dab17
@@ -69,6 +69,10 @@
|
||||
{
|
||||
"note": "Add EIP712 types for Staking",
|
||||
"pr": 1910
|
||||
},
|
||||
{
|
||||
"note": "Add `InvalidCobbDouglasAlphaError` `RevertError` type to `StakingRevertErrors`",
|
||||
"pr": "TODO"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user