added maker add/remove events to staking pools

This commit is contained in:
Greg Hysen
2019-06-27 15:54:13 -07:00
parent ab3246cc71
commit 217811d0af
2 changed files with 40 additions and 7 deletions

View File

@@ -111,7 +111,7 @@ contract MixinStakingPool is
_createPoolInRewardVault(poolId, operatorShare);
// notify
emit PoolCreated(poolId, operatorAddress, operatorShare);
emit StakingPoolCreated(poolId, operatorAddress, operatorShare);
return poolId;
}
@@ -290,6 +290,12 @@ contract MixinStakingPool is
);
poolIdByMakerAddress[makerAddress] = poolId;
makerAddressesByPoolId[poolId].push(makerAddress);
// notify
emit MakerAddedToStakingPool(
poolId,
makerAddress
);
}
/// @dev Unrecords a maker for a pool.
@@ -330,5 +336,11 @@ contract MixinStakingPool is
// reset the pool id assigned to the maker.
poolIdByMakerAddress[makerAddress] = NIL_MAKER_ID;
// notify
emit MakerRemovedFromStakingPool(
poolId,
makerAddress
);
}
}

View File

@@ -13,12 +13,6 @@ interface IStakingEvents {
uint256 amount
);
event PoolCreated(
bytes32 poolId,
address operatorAddress,
uint8 operatorShare
);
event ExchangeAdded(
address exchangeAddress
);
@@ -68,4 +62,31 @@ interface IStakingEvents {
event OwnershipTransferred(
address newOwner
);
/// @dev Emitted by MixinStakingPool when a new pool is created.
/// @param poolId Unique id generated for pool.
/// @param operatorAddress Address of creator/operator of pool.
/// @param operatorShare The share of rewards given to the operator.
event StakingPoolCreated(
bytes32 poolId,
address operatorAddress,
uint8 operatorShare
);
/// @dev Emitted by MixinStakingPool when a new maker is added to a pool.
/// @param poolId Unique id of pool.
/// @param makerAddress Adress of maker added to pool.
event MakerAddedToStakingPool(
bytes32 poolId,
address makerAddress
);
/// @dev Emitted by MixinStakingPool when a maker is removed from a pool.
/// @param poolId Unique id of pool.
/// @param makerAddress Adress of maker added to pool.
event MakerRemovedFromStakingPool(
bytes32 poolId,
address makerAddress
);
}