Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds additional comments to warn about indexing events for rune address #56

Merged
merged 2 commits into from
Jun 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions foundry/src/StakingV1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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 and event for when user calls setRuneAddress
0xean marked this conversation as resolved.
Show resolved Hide resolved
/// @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);
Expand Down