@0x:contracts-staking Added tests for protocol fees

This commit is contained in:
Alex Towle
2019-09-04 22:02:21 -07:00
parent 494dc475c1
commit 30fee43928
15 changed files with 585 additions and 40 deletions

View File

@@ -179,6 +179,19 @@ export class InvalidStakeStatusError extends RevertError {
}
}
export class InvalidProtocolFeePaymentError extends RevertError {
constructor(
expectedProtocolFeePaid?: BigNumber | number | string,
actualProtocolFeePaid?: BigNumber | number | string,
) {
super(
'InvalidProtocolFeePaymentError',
'InvalidProtocolFeePaymentError(uint256 expectedProtocolFeePaid, uint256 actualProtocolFeePaid)',
{ expectedProtocolFeePaid, actualProtocolFeePaid },
);
}
}
const types = [
MiscalculatedRewardsError,
OnlyCallableByExchangeError,
@@ -200,6 +213,7 @@ const types = [
EthVaultNotSetError,
RewardVaultNotSetError,
InvalidStakeStatusError,
InvalidProtocolFeePaymentError,
];
// Register the types we've defined.