As we can see in polkadotjs, when we add pallet then we can see interaction interface as shown in image below. But how this code is generated? Where can I find the code?
1 Answer
The code for the pallet specifically is not in JavaScript, it is written in Rust. The code for this UI is located in this repo. The pallets emit type metadata that components in the apps repo utilize to construct the UIs you are using.
-
-
It's because you're actually on page-extrinsics. And as mentioned, you might find that a lot of this logic is automatically (magically) generated from the type metadata. These extrinsic calls especially. It's just one giant data (JSON) blob that says what pallets have what extrinsic calls/state calls/rpc calls, etc. Jul 27 at 17:43