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

Nat specification #1

Merged
merged 16 commits into from
Sep 13, 2023
Prev Previous commit
Next Next commit
Fix typos
  • Loading branch information
Cyace84 committed Aug 30, 2023
commit a1fb6fc5da15893518f4057dc7b29bdd4c63ed93
5 changes: 0 additions & 5 deletions contracts/StEverVault.tsol
Original file line number Diff line number Diff line change
Expand Up @@ -469,11 469,6 @@ contract StEverVault is

/**
* @dev Handles the acceptance of a token burn.
* This function checks if the caller is the stTokenRoot and if the wallet is the stEverWallet, emits the WithdrawSuccess event, and transfers the remaining gas to the user.
* @param _amount The amount of tokens to be burned.
* @param _sender The sender of the tokens.
* @param wallet The wallet of the tokens.
* @param _payload The payload of the burn request.
*
* Preconditions:
* - The caller must be the stTokenRoot.
Expand Down
4 changes: 2 additions & 2 deletions contracts/base/StEverVaultBase.tsol
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 398,8 @@ abstract contract StEverVaultBase is StEverVaultStorage {
/**
* @dev Decodes the input payload.
* @param _payload The payload to decode.
* @return The decoded nonce and a boolean indicating if the payload was assembled correctly.
*
* @return nonce The nonce decoded from the payload.
* @return correct A boolean indicating if the payload was correctly decoded.
* Preconditions:
* - The payload must be correctly assembled.
*/
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IStEverAccount.tsol
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 67,7 @@ interface IStEverAccount {
* or the check `getAndCheckWithdrawToUserInfo` fails.
*
* @param rejectedWithdrawals The withdrawal requests to reset.
* @param _sendGasTo The address to send the gas to.
* @param sendGasTo The address to send the gas to.
*/
function resetPendingValues(mapping(uint64 => WithdrawRequest) rejectedWithdrawals, address sendGasTo) external;

Expand Down
6 changes: 3 additions & 3 deletions contracts/interfaces/IStEverCluster.tsol
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 77,21 @@ interface IStEverCluster {
* This function withdraws the specified amount of assurance,
* or the unlocked assurance if it is less.
*
* @param _amount The amount of assurance to withdraw.
* @param amount The amount of assurance to withdraw.
*/
function withdrawAssurance(uint128 amount) external;

/**
* @dev Function to deploy strategies for the cluster.
* @param _dePools The addresses of the DePools.
* @param dePools The addresses of the DePools.
*/
function deployStrategies(address[] dePools) external;
/**
* @dev Handles the deployment of a new strategy.
* This function sets the deployed status of the strategy to
* true and emits a {NewStrategyDeployed} event.
*
* @param _strategy The address of the strategy.
* @param strategy The address of the strategy.
*/
function onStrategyDeployed(address strategy) external;
/**
Expand Down
48 changes: 24 additions & 24 deletions contracts/interfaces/IStEverVault.tsol
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 271,8 @@ interface IStEverVault {
/**
* @dev Delegates strategies to a different cluster.
*
* @param _strategies The addresses of the strategies to delegate.
* @param _destinationCluster The address of the cluster to delegate the strategies to.
* @param strategies The addresses of the strategies to delegate.
* @param destinationCluster The address of the cluster to delegate the strategies to.
*/
function delegateStrategies(address[] strategies, address destinationCluster) external;

Expand Down Expand Up @@ -301,7 301,7 @@ interface IStEverVault {

/**
* @dev Deposits funds to the strategies according to the deposit configurations.
* @param _depositConfigs The configurations for the deposits.
* @param depositConfig Deposit configurations.
*/
function depositToStrategies(mapping(address => DepositConfig ) depositConfig) external;

Expand All @@ -312,7 312,7 @@ interface IStEverVault {

/**
* @dev Processes withdrawals from the strategies according to the withdrawal configurations.
* @param _withdrawConfig The configurations for the withdrawals.
* @param withdrawConfig The configurations for the withdrawals.
*/
function processWithdrawFromStrategies(mapping(address => WithdrawConfig) withdrawConfig) external;

Expand Down Expand Up @@ -340,7 340,7 @@ interface IStEverVault {
/**
* @dev Handles the event when a strategy has failed to handle a withdrawal.
*
* @param _errcode The error code of the failed withdrawal.
* @param errcode The error code of the failed withdrawal.
*/
function withdrawFromStrategyError(uint32 errcode) external;

Expand All @@ -358,14 358,14 @@ interface IStEverVault {
* the withdrawal info, and burns the tokens.
*
* @param amount The amount to be withdrawn.
* @param _user The user to withdraw to.
* @param _withdrawals The mapping of withdrawal requests.
* @param user The user to withdraw to.
* @param withdrawals The mapping of withdrawal requests.
*/
function withdrawToUser(uint128 amount, address user, mapping(uint64 => IStEverAccount.WithdrawRequest) withdrawals) external;

/**
* @dev Removes a pending withdrawal.
* @param _nonce The nonce of the withdrawal.
* @param nonce The nonce of the withdrawal.
*/
function removePendingWithdraw(uint64 nonce) external;

Expand Down Expand Up @@ -434,8 434,8 @@ interface IStEverVault {
/**
* @dev Handles the acceptance of a pending withdrawal.
*
* @param _nonce The nonce of the pending withdrawal.
* @param _user The user of the account.
* @param nonce The nonce of the pending withdrawal.
* @param user The user of the account.
* @param _unlockTime The unlock time of the pending withdrawal.
* @param remainingGasTo The address to which the remaining gas will be sent.
*/
Expand All @@ -444,10 444,10 @@ interface IStEverVault {
/**
* @dev Handles the rejection of a pending withdrawal.
*
* @param _nonce The nonce of the withdrawal.
* @param _user The user of the account.
* @param _amount The amount of the withdrawal.
* @param _remainingGasTo The address to which the remaining gas will be sent.
* @param nonce The nonce of the withdrawal.
* @param user The user of the account.
* @param amount The amount of the withdrawal.
* @param remainingGasTo The address to which the remaining gas will be sent.
*/
function onPendingWithdrawRejected(uint64 nonce, address user, uint128 amount, address remainingGasTo) external;

Expand All @@ -456,7 456,7 @@ interface IStEverVault {
*
* @param user The user of the account.
* @param nonce The nonce of the pending withdrawal.
* @param _amount The amount of the pending withdrawal.
* @param amount The amount of the pending withdrawal.
*/
function onPendingWithdrawRemoved(address user, uint64 nonce, uint128 amount) external;

Expand All @@ -465,8 465,8 @@ interface IStEverVault {
/**
* @dev Encodes the deposit payload for a given nonce.
*
* @param _nonce The nonce to encode.
* @return The encoded payload.
* @param nonce The nonce to encode.
* @return deposit_payload The encoded payload.
*/
function encodeDepositPayload(uint64 nonce) external pure returns (TvmCell deposit_payload);

Expand All @@ -482,14 482,14 @@ interface IStEverVault {
/**
* @dev Sets the minimum strategy deposit value.
*
* @param _minStrategyDepositValue The new minimum strategy deposit value.
* @param minStrategyDepositValue The new minimum strategy deposit value.
*/
function setMinStrategyDepositValue(uint128 minStrategyDepositValue) external;

/**
* @dev Sets the minimum strategy withdraw value.
*
* @param _minStrategyWithdrawValue The new minimum strategy withdraw value.
* @param minStrategyWithdrawValue The new minimum strategy withdraw value.
*/
function setMinStrategyWithdrawValue(uint128 minStrategyWithdrawValue) external;

Expand All @@ -503,14 503,14 @@ interface IStEverVault {
/**
* @dev Sets the pause state of the contract.
*
* @param _isPaused The new pause state.
* @param isPaused The new pause state.
*/
function setIsPaused(bool isPaused) external;

/**
* @dev Sets the withdraw hold time in seconds.
*
* @param _holdTime The new withdraw hold time in seconds.
* @param _hold_time The new withdraw hold time in seconds.
*/
function setWithdrawHoldTimeInSeconds(uint64 _hold_time) external;

Expand Down Expand Up @@ -629,9 629,9 @@ interface IStEverVault {
/**
* @dev Handles the event of an account being upgraded.
*
* @param _user The user whose account was upgraded.
* @param _sendGasTo The address to send gas to.
* @param _newVersion The new version of the account.
* @param user The user whose account was upgraded.
* @param sendGasTo The address to send gas to.
* @param newVersion The new version of the account.
*/
function onAccountUpgraded(address user, address sendGasTo, uint32 newVersion) external;

Expand Down