From f80376d1273c28444567eb2a9bf8b4bac51145cb Mon Sep 17 00:00:00 2001 From: 0xean <0xean.eth@gmail.com> Date: Mon, 3 Jun 2024 11:21:15 -0400 Subject: [PATCH] adds additional comments to warn about indexing events for rune address (#56) * adds additional comments to warn about indexing events for rune address * spelling --- foundry/src/StakingV1.sol | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/foundry/src/StakingV1.sol b/foundry/src/StakingV1.sol index 56b4965..aa0b737 100644 --- a/foundry/src/StakingV1.sol +++ b/foundry/src/StakingV1.sol @@ -35,22 +35,37 @@ contract StakingV1 is uint256 public rewardPerTokenStored; event UpdateCooldownPeriod(uint256 newCooldownPeriod); + + /// @notice emits an event for when a user stakes tokens + /// @dev WARNING: a user can also update their address with setRuneAddress + /// @param account the address of the account that called stake + /// @param amount the amount of tokens being staked + /// @param runeAddress the RUNE address associated with the account event Stake( address indexed account, uint256 amount, string indexed runeAddress ); + event Unstake( address indexed account, uint256 amount, uint256 cooldownExpiry ); event Withdraw(address indexed account, uint256 amount); + + /// @notice emits an event for when user calls setRuneAddress + /// @dev WARNING: this event is not fired when a user calls stake and sets a rune address through that function. + /// Please see the Stake event for that information. + /// @param account The address of the account that called setRuneAddress + /// @param oldRuneAddress The old rune address associated with the account + /// @param newRuneAddress The new rune address associated with the account event SetRuneAddress( address indexed account, string indexed oldRuneAddress, string indexed newRuneAddress ); + event StakingPausedChanged(bool isPaused); event WithdrawalsPausedChanged(bool isPaused); event UnstakingPausedChanged(bool isPaused);