-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* First staking draft * deleted some of the procedures outdated content * Refined and updated all staking and delegation-related docs. * Deleted unnecessary sentence in entering-staking.adoc * Deleted some of the prerequisites in the procedures
- Loading branch information
1 parent
e42dbdf
commit 407dd71
Showing
12 changed files
with
97 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
components/Starknet/modules/staking/pages/claiming-rewards.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
components/Starknet/modules/staking/pages/delegating-stake.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
components/Starknet/modules/staking/pages/handling_staking_events.adoc
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
components/Starknet/modules/staking/pages/increasing-staking.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
components/Starknet/modules/staking/pages/staking-events-and-read-functions.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
[id="staking-events-and-read-functions"] | ||
= Staking Events and Read Functions | ||
|
||
:description: How to manage and respond to events emitted by the Starknet staking protocol. | ||
|
||
Staking events provide critical information about changes in the staking process, such as balance updates, delegation pool creation, and exit intents. Read functions allow you to query important staking details. For a complete list of events and read functions, including keys and data, please refer to the official Starknet staking repository (link:https://github.com/starkware-libs/starknet-staking[Starknet Staking Repo]) and the spec file (link:https://github.com/starkware-libs/starknet-staking/blob/main/docs/spec.md[spec.md]). | ||
|
||
== Staking Events | ||
|
||
Staking events provide a way to track the state and actions of the staking process in real time. The following are the relevant events: | ||
|
||
- `StakeBalanceChanged`: Emitted when a staker’s balance changes, either through direct staking or delegation. | ||
- `NewDelegationPool`: Emitted when a new delegation pool is created by a validator, marking the pool’s deployment. | ||
- `StakerExitIntent`: Emitted when a staker signals their intent to unstake, setting a future timestamp for exit. | ||
- `StakerRewardAddressChanged`: Emitted when a staker changes their reward address. | ||
- `OperationalAddressChanged`: Emitted when a staker changes their operational address. | ||
- `GlobalIndexUpdated`: Emitted when the global index used to calculate staking rewards is updated. | ||
- `NewStaker`: Emitted when a new staker joins the protocol and locks their tokens in the staking contract. | ||
- `CommissionChanged`: Emitted when a validator updates the commission rate for their delegation pool. | ||
- `StakerRewardClaimed`: Emitted when a staker or delegation pool claims their rewards. | ||
- `DeleteStaker`: Emitted when a staker is removed from the protocol. | ||
- `RewardsSuppliedToDelegationPool`: Emitted when rewards are supplied to a validator's delegation pool. | ||
- `Paused`: Emitted when the staking contract is paused. | ||
- `Unpaused`: Emitted when the staking contract is unpaused. | ||
|
||
These events help to track changes and facilitate automations or actions based on the state of the staking contract. | ||
|
||
== Read Functions | ||
|
||
These read functions allow you to query essential information from the staking contract. Use these functions to retrieve details about stakers, staking parameters, and the total amount staked. | ||
|
||
.Procedure | ||
|
||
. Using a Starknet block explorer, navigate to the staking. | ||
. In the contract interface, locate and select the relevant read function. | ||
. Enter the required parameters (if applicable). | ||
. Submit the query to retrieve the requested information. | ||
|
||
The following read functions are available: | ||
|
||
- `state_of`: Retrieves the staking details of a given staker, including their balance and reward address. | ||
Enter the following parameter: | ||
* `staker_address` - The address of the staker whose details you want to query. | ||
|
||
- `contract_parameters`: Retrieves the parameters of the staking contract, including the minimum stake amount and the reward supplier contract. | ||
|
||
- `get_total_stake`: Returns the total amount of STRK tokens currently staked in the protocol. | ||
|
||
- `is_paused`: Checks whether the staking contract is currently paused. |
2 changes: 1 addition & 1 deletion
2
components/Starknet/modules/staking/pages/switching-delegation-pools.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters