Extrinsics documentation

Question - is there anything more fully developed around extrinsics documentation than this area in Polkadot JS?

It would be incredibly useful if there were an “extrinsicWiki” that detailed all of the calls, call combinations and curiosities as they arise in nice and easy human readable form - with examples, both established and imagined.

Given onchain governance / referendums / decision making is Substrate’s primary differentiator it seems like a major hole to not have something - unless I’m missing some existing resource.

I’m talking here about standard out of the box substrate runtime which still amounts to a large number of calls and call combinations.

I’m stumbling into call combinations through a fairly adhoc process involving digging through available docs, asking a range of people and generally just trying things out.


Duly noted, as a developer (key word “developer”), I always jump into the repo and look at the extrinsics in the pallet. For example, if I was interested in the NFTs pallet, I would go to the Substrate repo > frame > nfts > src > lib.rs and anything with a #[pallet::call_index(x)] index is an extrinsic. So for example, create:

/// Issue a new collection of non-fungible items from a public origin.
/// This new collection has no items initially and its owner is the origin.
/// The origin must be Signed and the sender must have sufficient funds free.
/// `ItemDeposit` funds of sender are reserved.
/// Parameters:
/// - `admin`: The admin of this collection. The admin is the initial address of each
/// member of the collection's admin team.
/// Emits `Created` event when successful.
/// Weight: `O(1)`
pub fn create(

You can see it is super documented.

The other way is to go to the Substrate Rust Docs. So the example of the NFTs pallet:

  1. Go to https://paritytech.github.io/substrate/master
  2. Search “pallet_nfts”
  3. You should find this link: pallet_nfts - Rust
  4. Usually you have to click on “pallet” then “dispatchables” which would lead you to a link that lists all the pallet’s dispatchable calls (extrinsics):

But I do see what you’re saying, there can be a simpler, non-developer resource for extrinsics.

IMO, this is low-hanging fruit for a Polkadot AI bot :wink:


Hey Rich! We also have a metadata explorer on the Polkadot Wiki that lets you dive deeper into the runtimes of Polkadot, Kusama, Asset Hubs and Rococo Metadata Explorer · Polkadot Wiki


yep. moonbeam seem to have the clearest docs given it’s a monkey not a dev looking.

i’m currently trying to work out how to create a game of Snake using referendums and system remarks for us all to play.

i’m assuming this isn’t in the documentation.

Even as someone who does dev work, but not in substrate/rust, working out where the pallet code lives is non-trivial (or I’ve not worked out the magic path to follow to get to it). For example, I was just looking for the Open Gov pallet code. I think it might be pallet_referenda_referenda, but there’s no such pallet in the substrate marketplace or https://docs.substrate.io/ as far and I can see, and this seems related but doesn’t seem to cover the extrinsics: pallet_referenda - Rust. And I don’t even know where to start looking for the correct source control repo for it.

(This is more of a “this is the kind of issue people might have” comment, rather than a “please fix this issue for me personally” one. I found what I was looking for in the Moonbeam docs in the end.)

EDIT: Though it might be an eyesight failure on my part…

Extrinsics and Polkadot JS feels like we’re still stuck in the Etherscan era of interacting with smart contracts.

WARNING… you’re straying dangerously #off-topic @JoakimEQ. Assume I’ll be flagged.

Lets try and see Polkadot through new eyes.

The Etherscan snake era.

I’ve looked a bit into how to generate app developers (as opposed to network developers) focused documentation. So far this is the list of options I’ve found to start:

  1. Metadata. As already mentioned the metadata is one source for building documentation. This has limits, but has improved with v15.

  2. Rust Docs. Recent changes have added a way to export the rust docs as JSON now. So as long as the chain has good code level documentation (somewhat enforceable by cargo check), we are just missing a transformation between the cargo-doc json and the desired output.

  3. Hand written. While these have an issue of being slow to update, extrinsics don’t change that often. That said it is easy to customize the data for a particular chain’s target audience and isn’t interjected with things that are important only for the Rust developers.

I have mostly been thinking about how to generate a nicer filtered and (likely markdown at the core) version of the docs from the rust docs JSON, but it has a TON of information to parse through. Or perhaps a poor version starting from this then shifting to human edited.

I am imagining something that sounds a bit like what you want. API style doc setup for application developers building on top of a chain (or chains).


Yes, though I’m actually thinking a little adjacent in my framing. So instead of “app developers” think about groups of people / collectives who are part of a small social network, who want to use / play around with extrinsics as part of some super-basic coordinating functions.

This group might then develop apps, but in its simplest form, I’m imagining extrinsic documentation for this kind of subset of users… I’m going to try and write an RFP to more clearly articulate what I’m thinking.

This is why I’m interested in quirks and oddities and “unlocking” weird combinations via Utility Batch etc