stakingUserProcess
Function Type: internal
Internal wrapper function that processes user staking operations by calling the base staking process with the user as both payer and stake recipient. This function is called by presaleStaking
, publicStaking
, and goldenStaking
for standard user operations.
Parameters
Parameter | Type | Description |
---|---|---|
user | address | Address of the user performing the staking operation (both payer and recipient) |
amountOfStaking | uint256 | Amount of staking tokens to stake/unstake |
isStaking | bool | true = Stake, false = Unstake |
priorityFee_EVVM | uint256 | EVVM priority fee |
nonce_EVVM | uint256 | EVVM nonce |
priorityFlag_EVVM | bool | EVVM priority flag |
signature_EVVM | bytes | EVVM signature |
Workflow
The function supports two execution paths for standard user operations:
- Staking Operations: User pays for and receives staking status
- Unstaking Operations: User unstakes their own tokens
Staking Process
- Direct Delegation: Calls
stakingBaseProcess()
with user as bothuserAccount
andstakingAccount
- Parameter Mapping:
user
→userAccount
(who pays for the transaction)user
→stakingAccount
(who receives the stake - same address)
- Payment Processing: User pays for staking tokens through EVVM transaction
- Stake Assignment: User receives the staking status and benefits
Unstaking Process
- Direct Delegation: Calls
stakingBaseProcess()
with user as bothuserAccount
andstakingAccount
- Parameter Mapping:
user
→userAccount
(who initiates unstaking)user
→stakingAccount
(who loses stake - same address)
- Optional Payment: User may pay priority fee for unstaking (if priorityFee_EVVM > 0)
- Token Return: Staking tokens are returned to the user address
info
This function calls stakingBaseProcess with the user address as both userAccount
and stakingAccount
, ensuring the user is both the payer and recipient for all operations.