Skip to content

Commit 41e6255

Browse files
authored
Expanded on CLI tools in "Becoming a Validator" (#1436)
* added cli to procedure * added multiple options * refactored using cli * combined using block explorer and cli * rebase * rebase * minor fixes * minor fix * Update entering-staking.adoc
1 parent 83ba638 commit 41e6255

File tree

1 file changed

+45
-19
lines changed

1 file changed

+45
-19
lines changed

components/Starknet/modules/staking/pages/entering-staking.adoc

Lines changed: 45 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,56 @@ For more information on what happens during the staking process, see xref:archit
2222
* A Starknet-compatible xref:tools:ref-block-explorers.adoc[block explorer] or xref:tools:devtools/clis.adoc[CLI tool].
2323
* Sufficient STRK token balance in your wallet.
2424
+
25-
[TIP]
25+
[NOTE]
2626
====
2727
For validators who wish to use a secure hardware wallet, the https://www.ledger.com/[Ledger hardware wallet] is supported by both https://www.argent.xyz/blog/ledger-argent-integration/[Argent] and https://braavos.app/wallet-features/ledger-on-braavos/[Braavos] wallets.
2828
2929
====
3030

31-
.Procedure (using a block explorer)
31+
.Procedure
3232

33-
. Approve the STRK ERC20 contract for the transfer of tokens from your address to the staking contract:
34-
+
35-
.. Using a Starknet block explorer, navigate to the STRK contract by searching for xref:tools:important-addresses.adoc#fee_tokens[its address].
33+
. If you are using a block explorer:
34+
.. Navigate to the STRK contract by searching for xref:tools:important-addresses.adoc#fee_tokens[its address]
3635
.. In the contract interface, locate and select the `approve` function.
37-
.. Enter the following parameters:
38-
* In *`spender`*, enter the xref:overview.adoc#staking_contract[staking contract's address].
39-
* In *`amount`*, enter the number of STRK tokens you want to stake (note the xref:overview.adoc#economic_parameters[minimum stake for validators] and that STRK has 18 decimals).
40-
.. Submit the transaction to execute the approval.
41-
. Using a Starknet block explorer, navigate to the staking contract by searching for xref:overview.adoc#staking_contract[its address].
42-
. In the contract interface, locate and select the `stake` function.
43-
. Enter the following parameters:
44-
+
45-
* In *`reward_address`*, enter the address where the rewards will be sent.
46-
* In *`operational_address`*, enter the address that xref:overview.adoc#first_stage[in the future] will be used for block attestations and sequencing.
47-
* In *`amount`*, enter the number of STRK tokens you want to stake (note the xref:overview.adoc#economic_parameters[minimum stake for validators] and that STRK has 18 decimals).
48-
* In *`pool_enabled`*, enter `1` (true) if you wish to enable delegation pooling, otherwise enter `0` (false).
49-
* In *`commission`*, enter the commission rate for any delegated staking. The rate should be entered as a percentage with precision, where 10000 represents 100%. For example, to set a 5% commission, you would enter 500.
50-
. Submit the transaction to execute the staking operation.
36+
. Pre-approve the STRK ERC20 contract for the transfer of tokens from your address to the staking contract by invoking its `approve` function with the following parameters:
37+
* In the first parameter (`spender`), enter the xref:overview.adoc#staking_contract[staking contract's address].
38+
* In the second parameter (`amount`), enter the number of STRK tokens you want to stake (note the xref:overview.adoc#economic_parameters[minimum stake for validators] and that STRK has 18 decimals).
39+
40+
[TIP]
41+
====
42+
If you using Starkli as CLI tool, the following example, which approves the STRK contract to transfer 1 STRK to the staking contract on Sepolia, can be used as reference:
43+
44+
[source,bash]
45+
----
46+
starkli invoke 0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d approve \
47+
0x03745ab04a431fc02871a139be6b93d9260b0ff3e779ad9c8b377183b23109f1 u256:1000000000000000000 \
48+
--network=sepolia
49+
----
50+
51+
====
52+
53+
[start=3]
54+
. If you are using a block explorer:
55+
.. Navigate to the staking contract by searching for xref:overview.adoc#staking_contract[its address].
56+
.. In the contract interface, locate and select the `stake` function.
57+
. Invoke the staking contract's `stake` function with the following parameters:
58+
* In the first parameter (`reward_address`), enter the address where the rewards will be sent.
59+
* In the second parameter (`operational_address`), enter the address that xref:overview.adoc#first_stage[in the future] will be used for block attestations and sequencing.
60+
* In the third parameter (`amount`), enter the number of STRK tokens you want to stake (note the xref:overview.adoc#economic_parameters[minimum stake for validators] and that STRK has 18 decimals).
61+
* In the fourth parameter (`pool_enabled`), enter `1` (true) if you wish to enable delegation pooling, otherwise enter `0` (false).
62+
* In the fifth parameter (`commission`), enter the commission rate for any delegated staking. The rate should be entered as a percentage with precision, where 10000 represents 100%. For example, to set a 5% commission, you would enter 500.
63+
64+
[TIP]
65+
====
66+
If you are using Starkli as CLI tool, the following example, which stakes 1 STRK with delegation pooling enabled and 1% commission on Sepolia, can be used as reference:
67+
68+
[source,bash]
69+
----
70+
starkli invoke 0x03745ab04a431fc02871a139be6b93d9260b0ff3e779ad9c8b377183b23109f1 stake \
71+
<reward_address> <operational_address> 1000000000000000000 1 100 \
72+
--network=sepolia
73+
----
74+
====
75+
76+
[start=5]
5177
. Register your validator on link:https://forms.gle/BUMEZx9dpd3DcdaT8[Karnot's], link:https://stakingrewards.typeform.com/to/aZdO6pW7[Staking Rewards'], and link:https://forms.gle/WJqrRbUwxSyG7M9x7[Voyager's] dashboards.

0 commit comments

Comments
 (0)