text: (window.webpackJsonp=window.webpackJsonp||[]).push([[135],{623:function(t,e,a){"use strict";a.r(e);var r=a(4),n=Object(r.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h2",{attrs:{id:"using-the-polkadot-ui-to-interact"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#using-the-polkadot-ui-to-interact"}},[t._v("#")]),t._v(" Using the Polkadot UI to Interact")]),t._v(" "),a("p",[t._v("To simplify interactions with the custom Substrate runtime, use the\n"),a("a",{attrs:{href:"https://polkadot.js.org/apps",target:"_blank",rel:"noopener noreferrer"}},[t._v("Polkadot JS UI for Substrate"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("p",[t._v("To have the UI connect to your local node, simply go to:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("Settings > remote node/endpoint to connect to > Local Node (127.0.0.1:9944)\n")])])]),a("p",[a("img",{attrs:{src:"https://i.imgur.com/1FpB5aM.png",alt:"A picture of the Polkadot UI Settings Tab"}})]),t._v(" "),a("p",[t._v("If the UI connected successfully, you should be able to go to the "),a("strong",[t._v("Explorer")]),t._v(" tab and see the block\nproduction process running.")]),t._v(" "),a("p",[a("img",{attrs:{src:"https://i.imgur.com/TXmM0cB.png",alt:"A picture of the block production process running in Explorer tab"}})]),t._v(" "),a("p",[t._v("You can then interact with your custom functions in the "),a("strong",[t._v("Extrinsics")]),t._v(" tab under "),a("strong",[t._v("runtimeExample")]),t._v(":")]),t._v(" "),a("p",[a("img",{attrs:{src:"https://i.imgur.com/JFXSaHw.png",alt:"A picture of custom functions appearing in the Extrinsics tab"}})]),t._v(" "),a("h3",{attrs:{id:"viewing-storage-variables"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#viewing-storage-variables"}},[t._v("#")]),t._v(" Viewing Storage Variables")]),t._v(" "),a("p",[t._v("If you want to check the value of a storage variable that you created, you can go to:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("Chain State > runtimeExampleStorage > (variable name)\n")])])]),a("p",[t._v("From there you should be able to query the state of the variable. It may return "),a("code",[t._v("<unknown>")]),t._v(" if the\nvalue has not been set yet.")]),t._v(" "),a("p",[a("img",{attrs:{src:"https://i.imgur.com/JLoWxc3.png",alt:"A picture of viewing a storage variable in the Polkadot UI"}})]),t._v(" "),a("h3",{attrs:{id:"viewing-events"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#viewing-events"}},[t._v("#")]),t._v(" Viewing Events")]),t._v(" "),a("p",[t._v("Some runtime examples below generate "),a("code",[t._v("Events")]),t._v(" when functions are run. You can temporarily view these\nevents in the "),a("strong",[t._v("Explorer")]),t._v(" tab under "),a("strong",[t._v("recent events")]),t._v(" if any get generated.")]),t._v(" "),a("p",[a("img",{attrs:{src:"https://i.imgur.com/2jUtBUk.png",alt:"A picture of an event getting generated in the Explorer tab"}})]),t._v(" "),a("h3",{attrs:{id:"wasm-runtime-upgrade"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#wasm-runtime-upgrade"}},[t._v("#")]),t._v(" WASM Runtime Upgrade")]),t._v(" "),a("p",[t._v("Rather than restarting your chain for each update, you can also do an in-place runtime upgrade using\nthe Polkadot UI. If you do this, you will not get runtime messages appearing in your terminal, but\nyou should be able to interact with the chain via the UI just fine. To perform the upgrade, go to:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("Extrinsics > Upgrade Key > upgrade(new)\n")])])]),a("p",[t._v("There, you can select the file icon and upload the wasm file generated when you run "),a("code",[t._v("./build.sh")])]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("substrate-example/runtime/wasm/target/wasm32-unknown-unknown/release/node_runtime.compact.wasm\n")])])]),a("p",[a("img",{attrs:{src:"https://i.imgur.com/rujS3p6.png",alt:"A picture of upgrading the Substrate runtime"}})]),t._v(" "),a("p",[t._v("Once the upgrade is finalized, you should be able to refresh the UI and see your updates.")])])}),[],!1,null,null,null);e.default=n.exports}}]);