Просмотр исходного кода

doc/testnet/token: add screenshots

darkfi 1 год назад
Родитель
Сommit
4f412ad3a6

BIN
doc/src/testnet/img/alias-show.png


BIN
doc/src/testnet/img/alias.png


BIN
doc/src/testnet/img/alias2.png


BIN
doc/src/testnet/img/broadcast-mint.png


BIN
doc/src/testnet/img/broadcast2.png


BIN
doc/src/testnet/img/drk-balance.png


BIN
doc/src/testnet/img/drk-whackd-mldy.png


BIN
doc/src/testnet/img/generate-mint.png


BIN
doc/src/testnet/img/generate-mint2.png


BIN
doc/src/testnet/img/mint.png


BIN
doc/src/testnet/img/mint2.png


BIN
doc/src/testnet/img/token-list.png


BIN
doc/src/testnet/img/token-list2.png


+ 86 - 18
doc/src/testnet/token.md

@@ -23,7 +23,50 @@ You can check your wallet balance using `drk`:
 $ ./drk wallet --balance
 $ ./drk wallet --balance
 ```
 ```
 
 
-# Aliases
+![balance](img/drk-balance.png)
+
+# Creating tokens
+
+On the DarkFi network, we're able to mint custom tokens with some
+supply. To do this, we need to generate a mint authority keypair,
+and derive a token ID from it. We can simply do this by executing the
+following command:
+
+```
+$ ./drk token generate-mint
+```
+
+![generate-mint](img/generate-mint.png)
+
+This will generate a new token mint authority and will tell you what
+your new token ID is.
+
+You can list your mint authorities with:
+
+```
+$ ./drk token list
+```
+
+![token-list](img/token-list.png)
+
+For this tutorial we will need two tokens so execute the command again
+to generate another one.
+
+```
+$ ./drk token generate-mint
+```
+
+![generate-mint2](img/generate-mint2.png)
+
+Verify you have two tokens by running:
+
+```
+$ ./drk token list
+```
+
+![token-list](img/token-list2.png)
+
+## Aliases
 
 
 To make our life easier, we can create token ID aliases, so when we
 To make our life easier, we can create token ID aliases, so when we
 are performing transactions with them, we can use that instead of the
 are performing transactions with them, we can use that instead of the
@@ -47,47 +90,72 @@ $ ./drk alias show
 Note: these aliases are only local to your machine. When exchanging
 Note: these aliases are only local to your machine. When exchanging
 with other users, always verify that your aliases' token IDs match.
 with other users, always verify that your aliases' token IDs match.
 
 
-# Minting tokens
-
-On the DarkFi network, we're also able to mint custom tokens with
-some supply. To do this, we need to generate a mint authority keypair,
-and derive a token ID from it. We can simply do this by executing the
-following command:
+Now let's add the two token IDs generated earlier to our aliases:
 
 
 ```
 ```
-$ ./drk token generate-mint
+$ ./drk alias add WCKD {TOKEN1}
 ```
 ```
 
 
-This will generate a new token mint authority and will tell you what
-your new token ID is. For this tutorial we will need two tokens so
-execute the command again to generate another one.
-
-You can list your mint authorities with:
+![alias](img/alias.png)
 
 
 ```
 ```
-$ ./drk token list
+$ ./drk alias add MLDY {TOKEN2}
 ```
 ```
 
 
-Now let's add those two token IDs to our aliases:
+![alias2](img/alias2.png)
 
 
 ```
 ```
-$ ./drk alias add WCKD {TOKEN1}
-$ ./drk alias add MLDY {TOKEN2}
+$ ./drk alias show
 ```
 ```
 
 
+![alias-show](img/alias-show.png)
+
+## Mint transaction
+
 Now let's mint some tokens for ourselves. First grab your wallet address,
 Now let's mint some tokens for ourselves. First grab your wallet address,
 and then create the token mint transaction, and finally - broadcast it:
 and then create the token mint transaction, and finally - broadcast it:
 
 
 ```
 ```
 $ ./drk wallet --address
 $ ./drk wallet --address
+```
+
+![step6](img/step7.png)
+
+```
 $ ./drk token mint WCKD 42.69 {YOUR_ADDRESS} > mint_tx
 $ ./drk token mint WCKD 42.69 {YOUR_ADDRESS} > mint_tx
+```
+
+![mint](img/mint.png)
+
+```
 $ ./drk broadcast < mint_tx
 $ ./drk broadcast < mint_tx
+```
+
+![broadcast-mint](img/broadcast-mint.png)
 
 
+```
 $ ./drk token mint MLDY 20.0 {YOUR_ADDRESS} > mint_tx
 $ ./drk token mint MLDY 20.0 {YOUR_ADDRESS} > mint_tx
+```
+
+![mint2](img/mint2.png)
+
+```
 $ ./drk broadcast < mint_tx
 $ ./drk broadcast < mint_tx
 ```
 ```
 
 
+![broadcast2](img/broadcast2.png)
+
 Now the transaction should be published to the network. If you have
 Now the transaction should be published to the network. If you have
 an active block subscription (which you can do with `drk subscribe`),
 an active block subscription (which you can do with `drk subscribe`),
 then when the transaction is confirmed, your wallet should have your
 then when the transaction is confirmed, your wallet should have your
-new tokens listed when you request to see the balance.
+new tokens listed when you run:
+
+```
+$ ./drk wallet --balance
+```
+
+![balances](img/drk-whackd-mldy.png)
+
+*Note that the WCKD balance in the above image is 2x the expected about
+of 42.69 (i.e.  85.38). This is not a bug, it's because we accidentally
+applied the mint_tx twice. Yay!*