Major Milestone for Solidity Smart Contracts: First Part of the Preview Release Now Live on Kusama

The docs are great and all, but they kinda skip over the most important bit, right?

How do you actually assemble an XCM message and get the raw binary data you need to send it? :thinking:

Worry not, brave explorer… PAPI to the rescue! :flexed_biceps::wink:

You can use the PAPI typed-codecs for nice, strongly-typed interfaces that make building any kind of XCM message a walk in the park. Check out this handy gist or jump straight into this StackBlitz sandbox to play around with it live.

If you prefer a more UI-driven experience, check out the PAPI-dev console where you can build the call-data of an XcmExecute and easily grab the encoded bytes you need (the message, basically, omitting the max_weight). Sadly, this kind of byte-level spelunking isn’t really doable in the PJS dev console, since it doesn’t let you fiddle with or copy the inner guts of the encoded data.

Have fun, and may your messages always route true. :flying_saucer::sparkles:

6 Likes