diff --git a/src/UniStaker.sol b/src/UniStaker.sol index d6ba3f1..b0868fe 100644 --- a/src/UniStaker.sol +++ b/src/UniStaker.sol @@ -275,6 +275,20 @@ contract UniStaker is INotifiableRewardReceiver, ReentrancyGuard, Multicall, EIP _depositId = _stake(msg.sender, _amount, _delegatee, _beneficiary); } + /// @notice Method to stake tokens to a new deposit. The caller must approve the staking + /// contract to spend at least the would-be staked amount of the token via a signature which is + /// is also provided, and is passed to the token contract's permit method before the staking + /// operation occurs. + /// @param _amount Quantity of the staking token to stake. + /// @param _delegatee Address to assign the governance voting weight of the staked tokens. + /// @param _beneficiary Address that will accrue rewards for this stake. + /// @param _deadline The timestamp at which the permit signature should expire. + /// @param _v ECDSA signature component: Parity of the `y` coordinate of point `R` + /// @param _r ECDSA signature component: x-coordinate of `R` + /// @param _s ECDSA signature component: `s` value of the signature + /// @return _depositId Unique identifier for this deposit. + /// @dev Neither the delegatee nor the beneficiary may be the zero address. The deposit will be + /// owned by the message sender. function permitAndStake( uint256 _amount, address _delegatee, @@ -331,6 +345,18 @@ contract UniStaker is INotifiableRewardReceiver, ReentrancyGuard, Multicall, EIP _stakeMore(deposit, _depositId, _amount); } + /// @notice Add more staking tokens to an existing deposit. A staker should call this method when + /// they have an existing deposit, and wish to stake more while retaining the same delegatee and + /// beneficiary. The caller must approve the staking contract to spend at least the would-be + /// staked amount of the token via a signature which is is also provided, and is passed to the + /// token contract's permit method before the staking operation occurs. + /// @param _depositId Unique identifier of the deposit to which stake will be added. + /// @param _amount Quantity of stake to be added. + /// @param _deadline The timestamp at which the permit signature should expire. + /// @param _v ECDSA signature component: Parity of the `y` coordinate of point `R` + /// @param _r ECDSA signature component: x-coordinate of `R` + /// @param _s ECDSA signature component: `s` value of the signature + /// @dev The message sender must be the owner of the deposit. function permitAndStakeMore( DepositIdentifier _depositId, uint256 _amount,