<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yogesh Kumar on Medium]]></title>
        <description><![CDATA[Stories by Yogesh Kumar on Medium]]></description>
        <link>https://medium.com/@itsyogesh18?source=rss-72533c4b4756------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*DOF_pBGUMySusz-l8gmsDw.jpeg</url>
            <title>Stories by Yogesh Kumar on Medium</title>
            <link>https://medium.com/@itsyogesh18?source=rss-72533c4b4756------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 23:26:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@itsyogesh18/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Every Substrate Type Deserves a Better Input]]></title>
            <link>https://medium.com/@itsyogesh18/every-substrate-type-deserves-a-better-input-296c7997d229?source=rss-72533c4b4756------2</link>
            <guid isPermaLink="false">https://medium.com/p/296c7997d229</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[blockchain-development]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[polkadot]]></category>
            <category><![CDATA[developer-tools]]></category>
            <dc:creator><![CDATA[Yogesh Kumar]]></dc:creator>
            <pubDate>Fri, 27 Feb 2026 20:12:08 GMT</pubDate>
            <atom:updated>2026-02-27T20:27:16.145Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How we built 30+ specialized components so you never have to type raw hex again.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EcIubhUk0KYu-0xVgLN7ZQ.gif" /></figure><p>Building an extrinsic builder for Polkadot sounds simple enough: read the chain metadata, generate some form fields, encode the result. In practice, it’s a rabbit hole. Every Substrate type has its own quirks, and treating them all as text fields defeats the purpose of building a tool in the first place.</p><p>In my <a href="https://medium.com/p/a76b43518b33">first article</a>, I introduced <a href="https://relaycode.org/">Relaycode</a> and the idea behind it. This one goes deeper: how we handle every type the chain can throw at us, and the system that decides which component to use.</p><h3>The Problem With Generic Inputs</h3><p>Most blockchain tools take the easy route. They read the type name from metadata and render a text field. You’re left to figure out the encoding yourself. Is this balance in planck or DOT? Is this hex string supposed to be 32 bytes or 64?</p><p>I wanted something different. When you select balances.transferKeepAlive, the destination field should show your connected wallets with Identicons. The amount field should let you type &quot;1.5 DOT&quot; instead of &quot;15000000000&quot;. When you&#39;re voting on a referendum, you should see which referenda are actually active, not a blank number field.</p><p>That meant building a dedicated input component for every major Substrate type, plus context-aware selectors that know which pallet you’re in.</p><h3>How Type Resolution Works</h3><p>At the core of Relaycode’s input system is a priority-based component registry. When the builder encounters a type, it walks through the registry top-to-bottom, checking each entry’s patterns against the type name. The first match wins.</p><pre>AccountId32      → Account input (priority 100)<br>Compact&lt;Balance&gt; → Balance input (priority 95)<br>Vec&lt;u8&gt;          → Bytes input (priority 75)<br>Option&lt;H256&gt;     → Option wrapper → Hash input<br>Vec&lt;AccountId&gt;   → Vector → Account input (recursive)</pre><p>Priority matters. Compact&lt;Balance&gt; needs to match the Balance component (priority 95) before the generic Amount component catches it with its /Compact&lt;/ regex (priority 90). Vec&lt;u8&gt; needs to match Bytes (priority 75) before the generic Vector component (priority 40) tries to render individual u8 fields.</p><p>When no pattern matches, the system falls back to reading the chain’s type registry. If the metadata says a type is an Enum, it gets the Enum component. If it’s a Struct, it gets the Struct component. Only truly unknown types fall through to a plain text input.</p><p>Then there’s a second layer: pallet-level overrides. Some fields need context. A u32 in convictionVoting.vote isn&#39;t just any number; it&#39;s a referendum index. So we maintain a mapping of pallet/method/field combinations to specialized selector components. These overrides take precedence over the type-based registry, giving you a referendum picker instead of a number field.</p><h3>The Type-Based Components</h3><h3>Account</h3><p>Covers AccountId32, AccountId20, MultiAddress, Address, and LookupSource. This is the one I&#39;m most proud of. Instead of pasting a 48-character SS58 address and hoping you got it right, you get a combobox that shows your connected wallet accounts with identicons, display names, and balances. Identity display names are resolved via the <a href="https://wisesama.com/">Wisesama API</a>. You can still paste an address manually, and it validates the SS58 format in real time. (<a href="https://relaycode.org/docs/components/account-input">docs</a>)</p><figure><img alt="Relaycode account selector showing connected wallets with identicons, display names, and balances. Data fetched from wisesama.com" src="https://cdn-images-1.medium.com/max/1024/1*VQevip1XL7ACYi81lWzzww.gif" /></figure><p>The tricky part was MultiAddress. It&#39;s actually an enum with five variants (Id, Index, Raw, Address32, Address20), but 99% of the time you want the Id variant. So the Account component handles that wrapping for you. You pick an account, and the encoding includes the correct enum discriminant.</p><h3>Balance</h3><p>Polkadot uses 10 decimal places. Kusama uses 12. If you’ve ever accidentally sent 10 planck instead of 10 DOT, you know why a proper balance input matters.</p><p>Our <a href="https://relaycode.org/docs/components/balance-input">balance component</a> reads the chain’s token decimals and symbol automatically. Type “1.5 DOT” and it converts to 15000000000 planck for encoding. There’s a denomination dropdown if you want to switch to milliDOT or microDOT. Hit the “Max” button, and it fills in your available balance minus the existential deposit so you don’t accidentally dust your account.</p><p>The planck value shows below the input so you can always verify exactly what’s being encoded.</p><figure><img alt="Balance input with denomination dropdown showing DOT conversion to planck" src="https://cdn-images-1.medium.com/max/1024/1*SE3ACP4M7nv-7fZVFuqwUw.gif" /></figure><h3>Amount</h3><p>All the numeric primitives: u8 through u128, their signed counterparts, and compact-encoded versions.</p><p>The catch-all <a href="https://relaycode.org/docs/components/amount-input">numeric input</a>. It validates against the type’s range (u8 can’t exceed 255, u32 can’t exceed 4,294,967,295) and shows the bounds in the placeholder. Compact encoding just works without you thinking about it.</p><p>This is intentionally lower priority than Balance so that balance-specific fields get the richer component with denomination switching and max button, while plain numeric fields get a simple validated number input.</p><h3>Boolean</h3><p>bool gets a <a href="https://relaycode.org/docs/components/bool-input">toggle switch</a>. Simple, but it beats typing &quot;true&quot; into a text field and wondering if the encoding expects a string or a byte.</p><figure><img alt="Boolean toggle switch for Substrate bool type" src="https://cdn-images-1.medium.com/max/1024/1*gcac_p0L3RT49ns9UV56rA.png" /></figure><h3>Hash Inputs (H160, H256, H512)</h3><p>Three separate components for H160 (20 bytes), H256 (32 bytes), and H512 (64 bytes). Each enforces the correct byte length. The input shows a 0x prefix, validates hex characters, and has a running byte counter so you can see &quot;12/32 bytes&quot; as you type. (<a href="https://relaycode.org/docs/components/hash-input">docs</a>)</p><p>We split these into three because getting the length wrong is one of the most common errors in raw hex input. Paste a 32-byte hash into an H160 field and you’ll see the validation error immediately.</p><figure><img alt="H256 hash input with hex validation and byte counter" src="https://cdn-images-1.medium.com/max/1024/1*0QPPuBSIJfplipw67yXoDQ.gif" /></figure><h3>Bytes</h3><p>This one intercepts Vec&lt;u8&gt; before the generic Vector component can turn it into a list of individual byte inputs (which would be terrible UX for arbitrary data). Instead, you get a multi-mode editor with five input options: hex (0x-prefixed), plain text, JSON, Base64, and file upload. Switch between them and the component converts automatically. Enter a JSON object, and it gets serialized to bytes. Drop a file, and you get the raw bytes. All modes produce the same hex-encoded output for SCALE encoding. (<a href="https://relaycode.org/docs/components/bytes-input">docs</a>)</p><figure><img alt="Multi-mode bytes editor with hex, text, JSON, Base64, and file upload options" src="https://cdn-images-1.medium.com/max/1024/1*wXISrDL4MOO7qYW_O4QduA.gif" /></figure><h3>Call</h3><p>This is where it gets recursive. A <a href="https://relaycode.org/docs/components/call-input">Call input</a> is essentially a mini extrinsic builder embedded inside the current one. You select a pallet and method, and it generates the parameter fields for that call. The encoded result becomes a single parameter value in the parent call.</p><figure><img alt="Recursive call input embedding a mini extrinsic builder" src="https://cdn-images-1.medium.com/max/1024/1*NpNn63k6N-pxJisaWYisEQ.gif" /></figure><p>This is what makes utility.batch actually usable. Instead of manually encoding each inner call and concatenating the bytes, you build each call visually and the nesting handles itself.</p><h3>Moment</h3><p>Substrate timestamps are milliseconds since epoch (a u64). Nobody wants to calculate that by hand. The <a href="https://relaycode.org/docs/components/moment-input">Moment input</a> gives you a date/time picker and converts it. You see a readable date; the chain sees the millisecond timestamp.</p><figure><img alt="Date/time picker with quick-set buttons converting to millisecond timestamp" src="https://cdn-images-1.medium.com/max/1024/1*FyzIUuMaPqFVn_YK31oRUQ.gif" /></figure><h3>Vote and VoteThreshold</h3><p>AccountVote in Polkadot governance has a specific structure: Standard (aye/nay with conviction) or Split (split between aye and nay). The <a href="https://relaycode.org/docs/components/vote-input">Vote component</a> gives you radio buttons for the direction and a conviction multiplier selector (None through 6x), instead of expecting you to know the binary encoding format.</p><figure><img alt="Vote input with aye/nay selection and conviction multiplier" src="https://cdn-images-1.medium.com/max/1024/1*OsPkQjb_pFFdZz_jsybXiA.gif" /></figure><p>VoteThreshold is simpler: a dropdown for SuperMajorityApprove, SuperMajorityAgainst, or SimpleMajority. (<a href="https://relaycode.org/docs/components/vote-threshold-input">docs</a>)</p><h3>KeyValue</h3><p>Two hex fields side by side for storage <a href="https://relaycode.org/docs/components/key-value-input">key-value pairs</a>. Not much to say about this one.</p><figure><img alt="Key-value pair input with side-by-side hex fields" src="https://cdn-images-1.medium.com/max/1024/1*ja6kFEPri16g-jtJvdDqvw.gif" /></figure><h3>Option</h3><p>Option&lt;T&gt; for any inner type T.</p><p>A <a href="https://relaycode.org/docs/components/option-input">wrapper component</a> with a toggle. Flip the switch to “Some” and the inner component appears (whatever type T resolves to). Flip it to &quot;None&quot; and the field collapses. The encoding handles the 0x00/0x01 prefix automatically.</p><p>This is a good example of the recursive nature of our system. Option&lt;Balance&gt; renders a toggle that wraps a Balance input. Option&lt;Vec&lt;AccountId&gt;&gt; renders a toggle that wraps a Vector of Account inputs. The nesting composes naturally.</p><figure><img alt="Option wrapper with Some/None toggle around an inner type input" src="https://cdn-images-1.medium.com/max/1024/1*OYnOTOO7rkMEzWdhg2Oueg.gif" /></figure><h3>VectorFixed</h3><p>For [T; N] fixed-length arrays like [u8; 32].</p><p><a href="https://relaycode.org/docs/components/vector-fixed-input">Fixed-length arrays</a> show exactly N input fields with no add/remove buttons. The count is determined from the type definition. For [u8; 32], instead of showing 32 individual number inputs, we detect the u8 inner type and fall through to a hex input similar to Hash256.</p><figure><img alt="Fixed-length array input with hex/Base64 encoding toggle for byte arrays" src="https://cdn-images-1.medium.com/max/1024/1*lRmYVlJn9Ec42e2DmegzQA.gif" /></figure><h3>BTreeMap</h3><p><a href="https://relaycode.org/docs/components/btree-map-input">Key-value pairs</a> where both the key and value types are known from metadata. Each entry shows two inputs side by side (one for the key type, one for the value type), with add/remove buttons for entries. Under the hood, SCALE serializes a BTreeMap as a length-prefixed sequence of (key, value) tuples, but you don’t need to think about that.</p><figure><img alt="BTreeMap input with key-value entries and add/remove controls" src="https://cdn-images-1.medium.com/max/1024/1*awuF8PvNZjaJ72pLsHTtAg.gif" /></figure><h3>BTreeSet</h3><p>Similar to <a href="https://relaycode.org/docs/components/vector-input">Vector</a> but with duplicate detection. If you try to add the same value twice, it flags the duplicate. The encoding is a length-prefixed sorted sequence.</p><h3>Vector</h3><p>Dynamic arrays with add/remove buttons. Each item renders the appropriate component for the inner type. For BoundedVec, the max length shows in the header and the add button disables when you hit the limit. (<a href="https://relaycode.org/docs/components/vector-input">docs</a>)</p><figure><img alt="Dynamic vector input with add/remove items and form/bulk toggle" src="https://cdn-images-1.medium.com/max/1024/1*e96K45Qp7UbKl2VEabhklA.gif" /></figure><h3>Tuple</h3><p>Positional collections. Each position renders the component for its type. A (AccountId, Balance) <a href="https://relaycode.org/docs/components/tuple-input">tuple</a> shows an account selector followed by a balance input. The position labels show as &quot;[0]&quot;, &quot;[1]&quot; since tuples are positionally typed.</p><h3>Struct</h3><p>Named field groups. Each field renders its own input based on the field’s type. <a href="https://relaycode.org/docs/components/struct-input">Structs</a> with many fields are collapsible. This is the workhorse for complex parameter types that don’t have a more specific component.</p><h3>Enum</h3><p>A variant selector dropdown followed by dynamic fields for the selected variant’s data. Changing the variant swaps out the fields below it. For simple enums with no data (like VoteThreshold), it&#39;s just a dropdown. For complex enums with nested types, each variant&#39;s fields render recursively. (<a href="https://relaycode.org/docs/components/enum-input">docs</a>)</p><figure><img alt="Enum variant selector dropdown with dynamic fields" src="https://cdn-images-1.medium.com/max/1024/1*SfShoAvURiaiYb4t2REfWQ.gif" /></figure><h3>Text (the fallback)</h3><p>Plain <a href="https://relaycode.org/docs/components/text-input">text input</a> with minimal validation. This is the safety net. If we encounter a type we’ve never seen, you can still enter a value. The text is interpreted as the raw encoding and passed through.</p><h3>The Contextual Selectors</h3><p>Type-based resolution handles 90% of cases, but some fields need more context. A u32 representing a referendum index is technically correct as a number input, but it&#39;s much more useful as a selector showing active referenda with their titles and vote tallies.</p><p>That’s where pallet overrides come in. We maintain a mapping:</p><pre>ConvictionVoting.vote.poll_index → ReferendumSelector<br>Staking.nominate.targets → ValidatorMultiSelector<br>NominationPools.join.pool_id → PoolSelector<br>Bounties.approve_bounty.bounty_id → BountySelector<br>Assets.transfer.id → AssetSelector</pre><p>These selectors query on-chain state to show you what’s actually available.</p><h3>Validator Selector</h3><p>When you nominate validators through staking.nominate, the targets field becomes a multi-select list of active validators. Each entry shows the validator&#39;s identity name (or truncated address), current commission rate, total stake, and nomination count. You can search, filter, and select up to 16 validators. Validator data is fetched from the <a href="https://www.subscan.io/">Subscan</a> API, which provides commission rates, total stake, and identity information. (<a href="https://relaycode.org/docs/components/validator-selector">docs</a>)</p><figure><img alt="Validator multi-selector showing identity names, commission rates, and stake" src="https://cdn-images-1.medium.com/max/1024/1*FgmF9-vMiqNWi4lirF5ixA.gif" /></figure><h3>Pool Selector</h3><p>For nomination pools, the <a href="https://relaycode.org/docs/components/pool-selector">selector</a> shows each pool’s name, state (Open, Destroying, Blocked), member count, and total staked amount. Pick a pool visually instead of guessing pool IDs. Pool metadata comes from the <a href="https://www.subscan.io/">Subscan API</a> as well.</p><figure><img alt="Nomination pool selector showing pool name, state, and member count" src="https://cdn-images-1.medium.com/max/1024/1*YTc9q3Ivj8Xw9Ulz3FIjuQ.gif" /></figure><h3>Referendum Selector</h3><p>Shows active referenda with their index, title (from on-chain metadata or subsquare), current tally (ayes vs nays as percentages), and status. You can filter between active and all referenda. Referendum titles and governance metadata are fetched from the <a href="https://polkassembly.io/">Polkassembly API</a>. (<a href="https://relaycode.org/docs/components/referendum-selector">docs</a>)</p><figure><img alt="Referendum selector showing active proposals with vote tallies" src="https://cdn-images-1.medium.com/max/1024/1*fTegFSrOMon7pRxMWiNw0g.gif" /></figure><h3>Bounty Selector</h3><p>Displays bounties with their title, value in DOT, curator identity, and status. Search by title or curator name. Bounty data, including curator identities and reward amounts, comes from the <a href="https://polkassembly.io/">Polkassembly API</a> as well. (<a href="https://relaycode.org/docs/components/bounty-selector">docs</a>)</p><figure><img alt="Bounty selector displaying titles, rewards in DOT, and curator info" src="https://cdn-images-1.medium.com/max/1024/1*o5VlG7iT42D9lRgVrcH5mw.gif" /></figure><h3>Asset Selector</h3><p>For the Assets pallet, shows registered assets with their ID, symbol, name, and whether they’re frozen. Search by ID or symbol.</p><h3>The Rest</h3><p>There are several more contextual selectors that follow the same pattern: <a href="https://relaycode.org/docs/components/track-selector"><strong>Track Selector</strong></a> gives you governance tracks (SmallSpender, BigSpender, Treasurer) as a dropdown. <strong>Proxy Type Selector</strong> lists the available proxy types for your chain. <strong>Core Selector</strong> shows available coretime cores in the Broker pallet. <strong>Destination Chain Selector</strong> lists parachain targets for XCM transfers. <strong>Multisig Call Selector</strong> helps find pending multisig calls by their hash.</p><p>And one that’s not really a selector: the <strong>Vesting Info Display</strong> shows your current vesting schedule (locked amount, per-block unlock rate, estimated completion) whenever you’re in the Vesting pallet. It’s just context, not an input, but it’s the kind of thing that saves you from opening a block explorer in another tab.</p><h3>How it composes</h3><p>30+ components sounds like a lot of code, but the system that picks them is small. The input registry is about 250 lines. The pallet overrides file is about 175 lines. Everything else is just individual components doing their own thing.</p><p>The design decision I keep coming back to is making everything recursive. An Option&lt;Vec&lt;(AccountId, Balance)&gt;&gt; renders as: Option toggle wrapping a Vector of Tuples, each containing an Account input and a Balance input. No special code for that combination. Each component only cares about its own type and delegates inner types back to the registry.</p><p>Adding new components is easy too. Register it with a pattern and priority, build the component, done. The staking selectors were added months after the core type system was in place. They just override specific fields without touching any existing code.</p><p>All of this is open source and live at <a href="https://relaycode.org/">relaycode.org</a>. The component registry lives in <a href="https://github.com/itsyogesh/relaycode/blob/master/lib/input-map.ts">lib/input-map.ts</a> and the pallet overrides in <a href="https://github.com/itsyogesh/relaycode/blob/master/lib/pallet-overrides.ts">lib/pallet-overrides.ts</a>. You can also browse the <a href="https://relaycode.org/docs/components">full component docs</a>.</p><p>If you’re building on Polkadot and have opinions about how any of these should work, file an issue or reach out.</p><p><a href="https://github.com/itsyogesh/relaycode">GitHub</a> | <a href="https://relaycode.org/">Try it</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=296c7997d229" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Extrinsics Shouldn’t Feel Like This]]></title>
            <link>https://medium.com/@itsyogesh18/building-extrinsics-shouldnt-feel-like-this-a76b43518b33?source=rss-72533c4b4756------2</link>
            <guid isPermaLink="false">https://medium.com/p/a76b43518b33</guid>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[blockchain-development]]></category>
            <category><![CDATA[substrate]]></category>
            <category><![CDATA[polkadot]]></category>
            <dc:creator><![CDATA[Yogesh Kumar]]></dc:creator>
            <pubDate>Fri, 20 Feb 2026 16:53:23 GMT</pubDate>
            <atom:updated>2026-02-20T18:30:40.636Z</atom:updated>
            <content:encoded><![CDATA[<p>How we rethought the Polkadot extrinsic builder from scratch — and why it matters for the ecosystem.</p><p>Last year, I was trying to nominate validators on Polkadot. I opened <a href="https://polkadot.js.org/apps/#/extrinsics">polkadot-js/apps,</a> navigated to the extrinsics tab, and was greeted with a wall of dropdowns and text fields. No context about which validators were performing well. No indication of what format my inputs needed to be in. Just raw parameter names pulled straight from the Rust source code.</p><p>I pasted an address, typed a balance in planck (because the input didn’t understand DOT denominations), double-checked the encoding in my head, and hit submit. The transaction failed. No helpful error message, just a generic dispatch error that I had to decode separately.</p><p>This is the extrinsic building experience that most people in the Polkadot ecosystem know. And honestly? It’s holding us back.</p><h3>The Current State of Extrinsic Building</h3><p><a href="https://polkadot.js.org/apps/#/extrinsics">polkadot-js/apps</a> has been the go-to interface for interacting with Substrate chains since the early days of Polkadot. And credit where it’s due: the team built something that supports every chain, every pallet, every type. That’s not easy.</p><p>But it was built as a developer tool, by developers, for developers who already understood the internals. The extrinsics page gives you raw parameter inputs. An AccountId32 is a text field. A Balance is a number input where you type in planck. An enum variant is a dropdown showing Rust variant names with zero additional context.</p><p>There’s no live encoding preview. You can’t paste hex call data and see what it decodes to. You can’t see your available balance next to the balance input. If a parameter expects a validator address, you go find that address somewhere else and paste it in. For experienced developers, this works. For everyone else, it’s a wall.</p><h3>So we built something different</h3><p>Relaycode started from a simple question: what if building an extrinsic felt like filling out a well-designed form? Not a form generated from Rust type definitions, but one actually designed for humans.</p><p>We got a Web3 Foundation grant to build it. Here’s what we came up with.</p><figure><img alt="Selecting a pallet and method in the Relaycode extrinsic builder, showing the Balances section with available methods like transfer_allow_death" src="https://cdn-images-1.medium.com/max/1024/1*NNQ44L37YU1PoiJPJh8jog.gif" /></figure><h4>The dual-pane layout</h4><p>Relaycode splits the screen into two panes. On the left, you build your extrinsic with friendly form inputs. Account fields have wallet dropdowns. Balance fields know about DOT denominations. Enum fields show you variant options with context. On the right, you see the SCALE-encoded hex updating in real time as you type.</p><p>This turns every interaction into a learning opportunity, almost by accident. Change a balance from 1 DOT to 2 DOT and watch which bytes change. Switch an enum variant and see how the encoding structure shifts. I didn’t set out to build a teaching tool, but the dual-pane layout makes SCALE encoding tangible in a way that documentation alone never could.</p><h4>Bi-directional editing</h4><p>This is the feature that gets the strongest reaction: editing works both ways. Fill in the form, get the hex. But you can also paste raw hex call data into the right pane and watch the form populate automatically. Every field fills in, types resolve, and you can see exactly what that call data represents.</p><p>I’ll give you a real scenario. A transaction fails on-chain. You grab the call data from a block explorer. In polkadot-js, you’d have to manually decode that hex to figure out what went wrong. In Relaycode, you paste it, the form populates, and you can immediately see the problem. Fix the wrong parameter, resubmit. Done.</p><p>No other extrinsic builder in the Polkadot ecosystem does this. It’s the single feature I’m most proud of.</p><figure><img alt="Relaycode’s dual-pane extrinsic builder showing a Balances transfer with form inputs on the left and live SCALE-encoded hex on the right" src="https://cdn-images-1.medium.com/max/1024/1*iBBb3daeyyGnh3yRmoJP2Q.gif" /></figure><h4>Multi-chain in one click</h4><p>Switching between Polkadot, Kusama, and Westend is one click. The builder reconnects, loads the new chain’s metadata, and adjusts everything: denominations, SS58 prefixes, available pallets, type definitions. You don’t lose your place, you don’t reload the page.</p><figure><img alt="Relaycode chain selector switching between Polkadot, Kusama, and Westend networks with automatic metadata and token denomination updates" src="https://cdn-images-1.medium.com/max/1024/1*zwnGP7d1LYzypjfSc6SRQQ.gif" /></figure><h4>Type badges</h4><p>A small detail that turned out to matter more than I expected: every parameter field shows its underlying Substrate type as a badge. MultiAddress, Compact&lt;Balance&gt;, Vec&lt;AccountId32&gt;. If you’re a developer learning the type system, you can see the direct connection between the friendly input you’re using and the actual type in the chain metadata. If you’re not a developer, you can safely ignore them.</p><h4>Dark mode</h4><p>The whole builder supports dark mode. Toggle it and every component, every input field, every badge adapts. It sounds minor until you’re debugging transactions at midnight.</p><figure><img alt="Toggling between light and dark mode in the Relaycode extrinsic builder, showing all components adapting to the dark theme" src="https://cdn-images-1.medium.com/max/1024/1*yHYTQrPC_Mv5TOLWhzrRdQ.gif" /></figure><h3>What’s under the hood</h3><p>Relaycode is built on <a href="https://github.com/dedotdev/dedot">Dedot</a>, not the older <a href="https://github.com/polkadot-js/api">polkadot-js/api</a>. We picked Dedot for a few specific reasons. It does runtime type introspection, which we need to generate form inputs dynamically from chain metadata. It has first-class SCALE codec support, which is the backbone of bi-directional editing. And it’s actively maintained with a clean TypeScript API.</p><p>Wallet connection is powered by <a href="https://github.com/nickytonline/luno-kit">LunoKit</a>. It handles multi-wallet support, account switching, and chain switching through a clean React hook API — so we could focus on the builder experience instead of writing wallet provider code from scratch.</p><figure><img alt="Relaycode wallet connection showing connected accounts with identicons and the chain selector for switching between Polkadot, Kusama, and Westend" src="https://cdn-images-1.medium.com/max/1024/1*PbfSOg831Sa1jRKtWPPTHQ.gif" /></figure><p>The input system uses a priority-based component resolution algorithm. When Relaycode encounters a type like <em>Vec&lt;MultiAddress&lt;AccountId32, ()&gt;&gt;,</em> it recursively finds the most specific component for each layer. A Vector input containing Account inputs, each with wallet integration and SS58 validation. You end up with a complex nested form that was generated entirely from the chain’s metadata.</p><h3>What’s next</h3><p>This post covered the big-picture features. In a follow-up post, I’ll go deep on the 20+ custom input components we built and how each one maps to a specific Substrate type. Account inputs with wallet integration, Balance inputs with denomination switching, Enum inputs with dynamic variant fields, Vector and BTreeMap editors, context-aware selectors that pull live on-chain data. There’s a lot there.</p><p>We’re also working on customizable snippets, so you can save and share reusable extrinsic templates. Imagine a “Nominate my validators” button that fills in your preferred set with one click, or a batch call template for common governance actions. That’s coming.</p><p>If you want to try it, head to<a href="https://relaycode.org/"> relaycode.or</a>g. Connect a wallet, pick a pallet, and build something. If you find a bug or have feedback, the codebase is open source on <a href="https://github.com/itsyogesh/relaycode">GitHub</a>.</p><p>Relaycode is built by <a href="https://github.com/itsyogesh">Yogesh Kumar</a> with support from t<a href="https://grants.web3.foundation/">he Web3 Foundation Grants Program</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a76b43518b33" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>