@0x:contracts-staking Modified Staking events to improve their usability

This commit is contained in:
Alex Towle 2019-09-23 17:32:52 -07:00
parent e9f0f4af86
commit db241e8f90
3 changed files with 5 additions and 19 deletions

View File

@ -108,16 +108,6 @@ interface IStakingEvents {
address zrxVaultAddress address zrxVaultAddress
); );
/// @dev Emitted by MixinScheduler when the timeLock period is changed.
/// @param timeLockPeriod The timeLock period we changed to.
/// @param startEpoch The epoch this period started.
/// @param endEpoch The epoch this period ends.
event TimeLockPeriodChanged(
uint256 timeLockPeriod,
uint256 startEpoch,
uint256 endEpoch
);
/// @dev Emitted by MixinStakingPool when a new pool is created. /// @dev Emitted by MixinStakingPool when a new pool is created.
/// @param poolId Unique id generated for pool. /// @param poolId Unique id generated for pool.
/// @param operator The operator (creator) of pool. /// @param operator The operator (creator) of pool.
@ -132,7 +122,7 @@ interface IStakingEvents {
/// @param poolId Unique id of pool. /// @param poolId Unique id of pool.
/// @param makerAddress Adress of maker joining the pool. /// @param makerAddress Adress of maker joining the pool.
event PendingAddMakerToPool( event PendingAddMakerToPool(
bytes32 poolId, bytes32 indexed poolId,
address makerAddress address makerAddress
); );
@ -140,7 +130,7 @@ interface IStakingEvents {
/// @param poolId Unique id of pool. /// @param poolId Unique id of pool.
/// @param makerAddress Adress of maker added to pool. /// @param makerAddress Adress of maker added to pool.
event MakerAddedToStakingPool( event MakerAddedToStakingPool(
bytes32 poolId, bytes32 indexed poolId,
address makerAddress address makerAddress
); );
@ -148,7 +138,7 @@ interface IStakingEvents {
/// @param poolId Unique id of pool. /// @param poolId Unique id of pool.
/// @param makerAddress Adress of maker added to pool. /// @param makerAddress Adress of maker added to pool.
event MakerRemovedFromStakingPool( event MakerRemovedFromStakingPool(
bytes32 poolId, bytes32 indexed poolId,
address makerAddress address makerAddress
); );

View File

@ -29,21 +29,17 @@ pragma solidity ^0.5.9;
interface IZrxVault { interface IZrxVault {
/// @dev Emitted when Zrx Tokens are deposited into the vault. /// @dev Emitted when Zrx Tokens are deposited into the vault.
/// @param sender Address of sender (`msg.sender`).
/// @param owner of Zrx Tokens. /// @param owner of Zrx Tokens.
/// @param amount of Zrx Tokens deposited. /// @param amount of Zrx Tokens deposited.
event ZrxDepositedIntoVault( event ZrxDepositedIntoVault(
address indexed sender,
address indexed owner, address indexed owner,
uint256 amount uint256 amount
); );
/// @dev Emitted when Zrx Tokens are withdrawn from the vault. /// @dev Emitted when Zrx Tokens are withdrawn from the vault.
/// @param sender Address of sender (`msg.sender`).
/// @param owner of Zrx Tokens. /// @param owner of Zrx Tokens.
/// @param amount of Zrx Tokens withdrawn. /// @param amount of Zrx Tokens withdrawn.
event ZrxWithdrawnFromVault( event ZrxWithdrawnFromVault(
address indexed sender,
address indexed owner, address indexed owner,
uint256 amount uint256 amount
); );

View File

@ -96,7 +96,7 @@ contract ZrxVault is
_balances[owner] = _balances[owner].safeAdd(amount); _balances[owner] = _balances[owner].safeAdd(amount);
// notify // notify
emit ZrxDepositedIntoVault(msg.sender, owner, amount); emit ZrxDepositedIntoVault(owner, amount);
// deposit ZRX from owner // deposit ZRX from owner
zrxAssetProxy.transferFrom( zrxAssetProxy.transferFrom(
@ -158,7 +158,7 @@ contract ZrxVault is
_balances[owner] = _balances[owner].safeSub(amount); _balances[owner] = _balances[owner].safeSub(amount);
// notify // notify
emit ZrxWithdrawnFromVault(msg.sender, owner, amount); emit ZrxWithdrawnFromVault(owner, amount);
// withdraw ZRX to owner // withdraw ZRX to owner
_zrxToken.transfer( _zrxToken.transfer(