@@ -61,41 +61,72 @@ $ ./target/release/node-template --dev
61
61
If the number after ` finalized: ` is increasing, your blockchain is producing new blocks and reaching
62
62
consensus about the state they describe!
63
63
64
- ## Start the Front End
64
+ ## Start the Front- End
65
65
66
- To interact with the local node we will use the Polkadot-js Apps user interface, often known as
67
- "Apps" for short. Despite the name, Apps will work with any Substrate-based blockchain including
68
- ours, not just Polkadot .
66
+ To interact with your local node, we will use
67
+ [ the Substrate Developer Hub Front-End Template ] ( https://github.com/substrate-developer-hub/substrate-front-end-template ) ,
68
+ which is a collection of UI components that have been designed with common use cases in mind .
69
69
70
- In your web browser, navigate to
71
- [ https://polkadot.js.org/apps ] ( https://polkadot.js.org/apps/#/settings?rpc=ws://127.0.0.1:9944 ) .
70
+ To get started with the Front-End Template, clone its repository and
71
+ [ follow the simple steps to run it locally ] ( https://github.com/substrate-developer-hub/substrate-front-end-template#using-the-template ) .
72
72
73
- On the ` Settings ` tab ensure that you are connected to a ` Local Node ` or ` ws://127.0.0.1:9944 ` .
73
+ ## Interact
74
74
75
- > Some browsers, notably Firefox, will not connect to a local node from an https website. An easy
76
- > work around is to try another browser, like Chromium. Another option is to
77
- > [ host this interface locally] ( https://github.com/polkadot-js/apps#development ) .
75
+ Once the Front-End Template is running and loaded in your browser at
76
+ [ http://localhost:8000/ ] ( http://localhost:8000/ ) , take a moment to explore its components. At the
77
+ top, you will find lots of helpful information about the chain to which you're connected as well as
78
+ an account selector that will let you control the account you use to perform on-chain operations.
78
79
79
- ## Interact
80
+ ![ Chain Data & Account Selector ] ( ../assets/chain-data.png )
80
81
81
- Select the ** Accounts** tab, you will see test accounts that you have access to. Some, like Alice
82
- and Bob, already have funds!
82
+ There is also a table that lists
83
+ [ the well-known test accounts] ( /kb/integrate/subkey#well-known-keys ) that you have access to. Some,
84
+ like Alice and Bob, already have funds!
83
85
84
- ![ Apps UI with pre-funded accounts ] ( ../assets/apps -prefunded.png )
86
+ ![ Account Table ] ( ../assets/accts -prefunded.png )
85
87
86
- You can try to transfer some funds from Alice to Charlie by clicking the "send" button.
88
+ Beneath the account table there is a Transfer component that you can use to transfer funds from
89
+ one account to another. Take note of the info box that describes the precision used by the Front-End
90
+ Template; you should transfer at least ` 1000000000000 ` to make it easy for you to observe the
91
+ changes you're making.
87
92
88
93
![ Balance Transfer] ( ../assets/apps-transfer.png )
89
94
90
- If everything went successfully, you should see some popup notifications claiming "Extrinsic
91
- Success", and of course Charlie's balance will increase.
95
+ Notice that the table of accounts is dynamic and that the account balances are updated as soon as
96
+ the transfer is processed.
97
+
98
+ ### Runtime Metadata
99
+
100
+ The Front-End Template exposes many helpful features and you should explore all of them while you're
101
+ connected to a local development node. One good way to get started is by clicking the "Show
102
+ Metadata" button at the top of the template page and reviewing
103
+ [ the metadata that your runtime exposes] ( https://www.substrate.io/kb/runtime/metadata ) .
104
+
105
+ ![ Metadata JSON] ( ../assets/metadata.png )
106
+
107
+ ### Pallet Interactor & Events
108
+
109
+ You can use the runtime metadata to discover a runtime's capabilities. The Front-End Template
110
+ provides a helpful Pallet Interactor component that provides several mechanisms for interacting with
111
+ a Substrate runtime.
112
+
113
+ ![ Pallet Interactor & Events] ( ../assets/interactor-events.png )
114
+
115
+ [ Extrinsics] ( /kb/learn-substrate/extrinsics ) are the runtime's callable functions; if you are
116
+ already familiar with blockchain concepts, you can think of them as transactions for now. The Pallet
117
+ Interactor allows you to submit [ unsigned] ( /kb/learn-substrate/extrinsics#unsigned-transactions ) or
118
+ [ signed] ( /kb/learn-substrate/extrinsics#signed-transactions ) extrinsics and also provides a button
119
+ that makes it easy to invoke an extrinsic by way of
120
+ [ the ` sudo ` function from the Sudo pallet] ( https://substrate.dev/rustdocs/v2.0.0-rc2/pallet_sudo/enum.Call.html#variant.sudo ) .
92
121
93
- ## Create Your Own Account
122
+ You can select Query interactions to read
123
+ [ the values present in your runtime's storage] ( /kb/runtime/storage ) . The RPC and Constant options
124
+ provide additional mechanisms for runtime interaction.
94
125
95
- You can create your own account by selecting the ` + Add Account ` button. It won't have any tokens
96
- yet, but you can send some from Alice or any other pre-funded account. Only you (and your browser)
97
- will know the private key for your own account which means nobody can transfer those tokens except
98
- you .
126
+ Like many blockchains, Substrate chains use [ events ] ( /kb/runtime/events ) to report the results of
127
+ asynchronous operations. If you have already used the Front-End Template to perform a balance
128
+ transfer as described above, you should see an event for the transfer in the Event component next to
129
+ the Pallet Interactor .
99
130
100
131
## Next Steps
101
132
0 commit comments