You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/apps/docs/src/pages/build/guides/election-dapp-tutorial/03-admin-account.md
+13-9
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ via the top section of the
52
52
navigation bar on the left side of the window. When you click `+ Generate Key` on the
53
53
top right, a new public key will be added to the list of public keys. Click `Add k: Account`
54
54
on the right of this new public key and your k:account will be added to the accounts
55
-
that you are watching via Chainweaver. Expand the row of the account you justed added
55
+
that you are watching via Chainweaver. Expand the row of the account you just added
56
56
by clicking the arrow on the left side of the account name. You will see that no KDA balance
57
57
exists for this account on any of the chains and the information about the owner and keyset
58
58
of the account is missing. This indicates that your account does not yet exist on Devnet.
@@ -95,16 +95,16 @@ npm run generate-types:coin:devnet
95
95
96
96
Now you are ready to run the npm script that executes the snippet `./transferCreate.ts`. Open up this
97
97
file in your editor to learn how the Kadena JavaScript client is used to call the `transfer-create`
98
-
function of the `coin` module to create and fund your admin account. After importing the depencies
98
+
function of the `coin` module to create and fund your admin account. After importing the dependencies
99
99
and creating the client with the right (Devnet) configuration, the
100
100
main function is called with information about the sender, the receiver and the amount. The amount
101
-
of KDA to transfer to the receiver is hardcoded to 20. The receiver will be you admin account name,
101
+
of KDA to transfer to the receiver is hardcoded to 20. The receiver will be your admin account name,
102
102
which you will specify as an argument when running the script. The sender, `sender00`, is one
103
103
of the pre-installed Devnet test accounts that holds some KDA on all chains. The public and private
104
104
key for this account were copied over from GitHub. Inside the main function, the amount to transfer
105
-
is converted to a PactDecimal, which boils down to this format: `{ decimal: '20.0' }`. Then, the
105
+
is converted to a `PactDecimal`, which boils down to this format: `{ decimal: '20.0' }`. Then, the
106
106
transaction is created. Creating this transaction is slightly more complex than the `list-modules`
107
-
you learned about in the previous chapter.
107
+
transaction you learned about in the previous chapter.
108
108
109
109
Instead of passing raw Pact code as a string to `Pact.builder.execution()`, the `coin['transferCreate']`
110
110
function is called on `Pact.modules` to generate the correct Pact code for you, based on the
@@ -126,22 +126,26 @@ admin account. Replace `k:account` with your admin account.
126
126
npm run transfer-create:devnet -- k:account
127
127
```
128
128
129
-
After a few seconds, `Write succeeded` should be printed in the terminal window. Verify that your account was created by checking the account details using the Kadena JavaScript client.
129
+
After a few seconds, `Write succeeded` should be printed in the terminal window. Verify that
130
+
your account was created by checking the account details using the Kadena JavaScript client.
130
131
Replace `k:account` with your admin account.
131
132
132
133
```bash
133
134
npm run coin-details:devnet -- k:account
134
135
```
135
136
136
137
This time, the script should print out the account name, the KDA balance and the receiver guard
137
-
of the account. Chainweaver will tell the same story. Navigate to `Accounts` in the top section of the left menu bar. Expand your admin account to view the information on all chains. You will
138
+
of the account. Chainweaver will tell the same story. Navigate to `Accounts` in the top section
139
+
of the left menu bar. Expand your admin account to view the information on all chains. You will
138
140
see that on chain 1 you are the owner, one keyset is defined and the balance is 20 KDA.
139
141
140
142
## Next steps
141
143
142
144
In this chapter you learned how to create a key for a Kadena account using Chainweaver and to
143
145
create and fund this account using the Kadena JavaScript client. You verified the creation
144
-
of the account in `Accounts` view of Chainweaver and by calling the `details` function of the `coin` module on Devnet using the Kadena JavaScript client. The admin user will use its KDA
145
-
to pay gas fees charged for deploying keysets, deploying smart contracts and sending transactions to nominate candidates for the election. In the following chapter you will learn
146
+
of the account in `Accounts` view of Chainweaver and by calling the `details` function of the
147
+
`coin` module on Devnet using the Kadena JavaScript client. The admin user will use its KDA
148
+
to pay gas fees charged for deploying keysets, deploying smart contract modules and sending
149
+
transactions to nominate candidates for the election. In the following chapter you will learn
146
150
how to create a namespace in which you will later define an admin keyset and deploy your
0 commit comments