Revert when attempting to delegate to/undelegate from a pool that doesn't exist

This commit is contained in:
Michael Zhu
2019-09-12 17:18:30 -07:00
parent 5d84d40a2c
commit 7cc1304eca
7 changed files with 91 additions and 20 deletions

View File

@@ -173,9 +173,12 @@ export class OperatorShareError extends RevertError {
}
}
export class PoolAlreadyExistsError extends RevertError {
constructor(poolId?: string) {
super('PoolAlreadyExistsError', 'PoolAlreadyExistsError(bytes32 poolId)', { poolId });
export class PoolExistenceError extends RevertError {
constructor(poolId?: string, alreadyExists?: boolean) {
super('PoolExistenceError', 'PoolExistenceError(bytes32 poolId, bool alreadyExists)', {
poolId,
alreadyExists,
});
}
}
@@ -266,7 +269,7 @@ const types = [
OnlyCallableIfInCatastrophicFailureError,
OnlyCallableIfNotInCatastrophicFailureError,
OperatorShareError,
PoolAlreadyExistsError,
PoolExistenceError,
RewardVaultNotSetError,
WithdrawAmountExceedsMemberBalanceError,
ProxyDestinationCannotBeNilError,