mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-25 14:17:57 +00:00
chore: migrate git dependencies to Gitea mirror (git.pezkuwichain.io)
This commit is contained in:
+106
@@ -0,0 +1,106 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Learn about the way Bizinikiwi and FRAME view their blockchains as state machines."><title>pezkuwi_sdk_docs::reference_docs::blockchain_state_machines - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module blockchain_state_machines</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module blockchain_<wbr>state_<wbr>machines</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#state-transition-function" title="State Transition Function">State Transition Function</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../index.html">reference_docs</a></div><h1>Module <span>blockchain_<wbr>state_<wbr>machines</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/pezkuwi_sdk_docs/reference_docs/blockchain_state_machines.rs.html#1-29">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Learn about the way Bizinikiwi and FRAME view their blockchains as state machines.</p>
|
||||
<h2 id="state-transition-function"><a class="doc-anchor" href="#state-transition-function">§</a>State Transition Function</h2>
|
||||
<p>This document briefly explains how in the context of Bizinikiwi-based blockchains, we view the
|
||||
blockchain as a <strong>decentralized state transition function</strong>.</p>
|
||||
<p>Recall that a blockchain’s main purpose is to help a permissionless set of entities to agree on
|
||||
a shared data-set, and how it evolves. This is called the <strong>State</strong>, also referred to as
|
||||
“onchain” data, or <em>Storage</em> in the context of FRAME. The state is where the account balance of
|
||||
each user is, for example, stored, and there is a canonical version of it that everyone agrees
|
||||
upon.</p>
|
||||
<p>Then, recall that a typical blockchain system will alter its state through execution of blocks.
|
||||
<em>The component that dictates how this state alteration can happen is called the state transition
|
||||
function</em>.</p>
|
||||
<pre class="mermaid" style="text-align:center;background: transparent;">
|
||||
flowchart LR
|
||||
B[Block] --> STF
|
||||
S[State] --> STF
|
||||
STF --> NS[New State]
|
||||
|
||||
</pre><script src="https://cdn.jsdelivr.net/npm/mermaid@9.4.3/dist/mermaid.min.js"></script>
|
||||
<script>
|
||||
mermaid.initialize({
|
||||
startOnLoad: false,
|
||||
theme: 'dark',
|
||||
flowchart: { useMaxWidth: true, htmlLabels: true },
|
||||
suppressErrorRendering: true
|
||||
});
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
const elements = document.querySelectorAll('.mermaid');
|
||||
for (const el of elements) {
|
||||
const code = el.textContent;
|
||||
try {
|
||||
const { svg } = await mermaid.render('mermaid-' + Math.random().toString(36).substr(2, 9), code);
|
||||
el.innerHTML = svg;
|
||||
} catch (e) {
|
||||
// On error, show as styled code block
|
||||
el.style.fontFamily = 'monospace';
|
||||
el.style.whiteSpace = 'pre';
|
||||
el.style.background = '#1e293b';
|
||||
el.style.padding = '1rem';
|
||||
el.style.borderRadius = '8px';
|
||||
el.style.color = '#94a3b8';
|
||||
el.style.fontSize = '0.85rem';
|
||||
el.style.border = '1px solid #334155';
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<p>In Bizinikiwi-based blockchains, the state transition function is called the <em>Runtime</em>. This is
|
||||
explained further in <a href="../wasm_meta_protocol/index.html" title="mod pezkuwi_sdk_docs::reference_docs::wasm_meta_protocol"><code>crate::reference_docs::wasm_meta_protocol</code></a>.</p>
|
||||
<p>With this in mind, we can paint a complete picture of a blockchain as a state machine:</p>
|
||||
<pre class="mermaid" style="text-align:center;background: transparent;">
|
||||
flowchart LR
|
||||
%%{init: {'flowchart' : {'curve' : 'linear'}}}%%
|
||||
subgraph BData[Blockchain Database]
|
||||
direction LR
|
||||
BN[Block N] -.-> BN1[Block N+1]
|
||||
end
|
||||
|
||||
subgraph SData[State Database]
|
||||
direction LR
|
||||
SN[State N] -.-> SN1[State N+1] -.-> SN2[State N+2]
|
||||
end
|
||||
|
||||
BN --> STFN[STF]
|
||||
SN --> STFN[STF]
|
||||
STFN[STF] --> SN1
|
||||
|
||||
BN1 --> STFN1[STF]
|
||||
SN1 --> STFN1[STF]
|
||||
STFN1[STF] --> SN2
|
||||
|
||||
|
||||
|
||||
</pre><script src="https://cdn.jsdelivr.net/npm/mermaid@9.4.3/dist/mermaid.min.js"></script>
|
||||
<script>
|
||||
mermaid.initialize({
|
||||
startOnLoad: false,
|
||||
theme: 'dark',
|
||||
flowchart: { useMaxWidth: true, htmlLabels: true },
|
||||
suppressErrorRendering: true
|
||||
});
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
const elements = document.querySelectorAll('.mermaid');
|
||||
for (const el of elements) {
|
||||
const code = el.textContent;
|
||||
try {
|
||||
const { svg } = await mermaid.render('mermaid-' + Math.random().toString(36).substr(2, 9), code);
|
||||
el.innerHTML = svg;
|
||||
} catch (e) {
|
||||
// On error, show as styled code block
|
||||
el.style.fontFamily = 'monospace';
|
||||
el.style.whiteSpace = 'pre';
|
||||
el.style.background = '#1e293b';
|
||||
el.style.padding = '1rem';
|
||||
el.style.borderRadius = '8px';
|
||||
el.style.color = '#94a3b8';
|
||||
el.style.fontSize = '0.85rem';
|
||||
el.style.border = '1px solid #334155';
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<p>In essence, the state of the blockchain at block N is the outcome of applying the state
|
||||
transition function to the previous state, and the current block as input. This can be
|
||||
mathematically represented as:</p>
|
||||
<div class="example-wrap"><pre class="language-math"><code>STF = F(State_N, Block_N) -> State_{N+1}</code></pre></div></div></details></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {};
|
||||
File diff suppressed because one or more lines are too long
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {};
|
||||
@@ -0,0 +1,89 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Learn about Bizinikiwi’s CLI, and how it can be extended."><title>pezkuwi_sdk_docs::reference_docs::cli - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module cli</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module cli</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#bizinikiwi-cli" title="Bizinikiwi CLI">Bizinikiwi CLI</a><ul><li><a href="#checking-the-available-cli-arguments" title="Checking the available CLI arguments">Checking the available CLI arguments</a></li><li><a href="#starting-a-local-bizinikiwi-node-in-development-mode" title="Starting a Local Bizinikiwi Node in Development Mode">Starting a Local Bizinikiwi Node in Development Mode</a></li><li><a href="#generating-custom-chain-specification" title="Generating Custom Chain Specification">Generating Custom Chain Specification</a></li><li><a href="#converting-chain-specification-to-raw-format" title="Converting Chain Specification to Raw Format">Converting Chain Specification to Raw Format</a></li><li><a href="#starting-the-first-node-in-a-private-network" title="Starting the First Node in a Private Network">Starting the First Node in a Private Network</a></li><li><a href="#adding-a-second-node-to-the-network" title="Adding a Second Node to the Network">Adding a Second Node to the Network</a></li></ul></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../index.html">reference_docs</a></div><h1>Module <span>cli</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/pezkuwi_sdk_docs/reference_docs/cli.rs.html#1-104">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Learn about Bizinikiwi’s CLI, and how it can be extended.</p>
|
||||
<h2 id="bizinikiwi-cli"><a class="doc-anchor" href="#bizinikiwi-cli">§</a>Bizinikiwi CLI</h2>
|
||||
<p>Let’s see some examples of typical CLI arguments used when setting up and running a
|
||||
Bizinikiwi-based blockchain. We use the <a href="https://github.com/pezkuwichain/pezkuwi-sdk/issues/195"><code>solochain-template</code></a>
|
||||
on these examples.</p>
|
||||
<h5 id="checking-the-available-cli-arguments"><a class="doc-anchor" href="#checking-the-available-cli-arguments">§</a>Checking the available CLI arguments</h5><div class="example-wrap"><pre class="language-bash"><code>./target/debug/node-template --help</code></pre></div>
|
||||
<ul>
|
||||
<li><code>--help</code>: Displays the available CLI arguments.</li>
|
||||
</ul>
|
||||
<h5 id="starting-a-local-bizinikiwi-node-in-development-mode"><a class="doc-anchor" href="#starting-a-local-bizinikiwi-node-in-development-mode">§</a>Starting a Local Bizinikiwi Node in Development Mode</h5><div class="example-wrap"><pre class="language-bash"><code>./target/release/node-template \
|
||||
--dev</code></pre></div>
|
||||
<ul>
|
||||
<li><code>--dev</code>: Runs the node in development mode, using a pre-defined development chain
|
||||
specification.
|
||||
This mode ensures a fresh state by deleting existing data on restart.</li>
|
||||
</ul>
|
||||
<h5 id="generating-custom-chain-specification"><a class="doc-anchor" href="#generating-custom-chain-specification">§</a>Generating Custom Chain Specification</h5><div class="example-wrap"><pre class="language-bash"><code>./target/debug/node-template \
|
||||
build-spec \
|
||||
--disable-default-bootnode \
|
||||
--chain local \
|
||||
> customSpec.json</code></pre></div>
|
||||
<ul>
|
||||
<li><code>build-spec</code>: A subcommand to generate a chain specification file.</li>
|
||||
<li><code>--disable-default-bootnode</code>: Disables the default bootnodes in the node template.</li>
|
||||
<li><code>--chain local</code>: Indicates the chain specification is for a local development chain.</li>
|
||||
<li><code>> customSpec.json</code>: Redirects the output into a customSpec.json file.</li>
|
||||
</ul>
|
||||
<h5 id="converting-chain-specification-to-raw-format"><a class="doc-anchor" href="#converting-chain-specification-to-raw-format">§</a>Converting Chain Specification to Raw Format</h5><div class="example-wrap"><pre class="language-bash"><code>./target/debug/node-template build-spec \
|
||||
--chain=customSpec.json \
|
||||
--raw \
|
||||
--disable-default-bootnode \
|
||||
> customSpecRaw.json</code></pre></div>
|
||||
<ul>
|
||||
<li><code>--chain=customSpec.json</code>: Uses the custom chain specification as input.</li>
|
||||
<li><code>--disable-default-bootnode</code>: Disables the default bootnodes in the node template.</li>
|
||||
<li><code>--raw</code>: Converts the chain specification into a raw format with encoded storage keys.</li>
|
||||
<li><code>> customSpecRaw.json</code>: Outputs to <code>customSpecRaw.json</code>.</li>
|
||||
</ul>
|
||||
<h5 id="starting-the-first-node-in-a-private-network"><a class="doc-anchor" href="#starting-the-first-node-in-a-private-network">§</a>Starting the First Node in a Private Network</h5><div class="example-wrap"><pre class="language-bash"><code>./target/debug/node-template \
|
||||
--base-path /tmp/node01 \
|
||||
--chain ./customSpecRaw.json \
|
||||
--port 30333 \
|
||||
--ws-port 9945 \
|
||||
--rpc-port 9933 \
|
||||
--telemetry-url "wss://telemetry.pezkuwichain.io/submit/ 0" \
|
||||
--validator \
|
||||
--rpc-methods Unsafe \
|
||||
--name MyNode01</code></pre></div>
|
||||
<ul>
|
||||
<li><code>--base-path</code>: Sets the directory for node data.</li>
|
||||
<li><code>--chain</code>: Specifies the chain specification file.</li>
|
||||
<li><code>--port</code>: TCP port for peer-to-peer communication.</li>
|
||||
<li><code>--ws-port</code>: WebSocket port for RPC.</li>
|
||||
<li><code>--rpc-port</code>: HTTP port for JSON-RPC.</li>
|
||||
<li><code>--telemetry-url</code>: Endpoint for sending telemetry data.</li>
|
||||
<li><code>--validator</code>: Indicates the node’s participation in block production.</li>
|
||||
<li><code>--rpc-methods Unsafe</code>: Allows potentially unsafe RPC methods.</li>
|
||||
<li><code>--name</code>: Sets a human-readable name for the node.</li>
|
||||
</ul>
|
||||
<h5 id="adding-a-second-node-to-the-network"><a class="doc-anchor" href="#adding-a-second-node-to-the-network">§</a>Adding a Second Node to the Network</h5><div class="example-wrap"><pre class="language-bash"><code>./target/release/node-template \
|
||||
--base-path /tmp/bob \
|
||||
--chain local \
|
||||
--bob \
|
||||
--port 30334 \
|
||||
--rpc-port 9946 \
|
||||
--telemetry-url "wss://telemetry.pezkuwichain.io/submit/ 0" \
|
||||
--validator \
|
||||
--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp</code></pre></div>
|
||||
<ul>
|
||||
<li><code>--base-path</code>: Sets the directory for node data.</li>
|
||||
<li><code>--chain</code>: Specifies the chain specification file.</li>
|
||||
<li><code>--bob</code>: Initializes the node with the session keys of the “Bob” account.</li>
|
||||
<li><code>--port</code>: TCP port for peer-to-peer communication.</li>
|
||||
<li><code>--rpc-port</code>: HTTP port for JSON-RPC.</li>
|
||||
<li><code>--telemetry-url</code>: Endpoint for sending telemetry data.</li>
|
||||
<li><code>--validator</code>: Indicates the node’s participation in block production.</li>
|
||||
<li><code>--bootnodes</code>: Specifies the address of the first node for peer discovery. Nodes should find
|
||||
each other using mDNS. This command needs to be used if they don’t find each other.</li>
|
||||
</ul>
|
||||
<hr />
|
||||
<blockquote>
|
||||
<p>If you are interested in learning how to extend the CLI with your custom arguments, you can
|
||||
check out the <a href="https://www.youtube.com/watch?v=IVifko1fqjw">Customize your Bizinikiwi chain CLI</a>
|
||||
seminar.
|
||||
Please note that the seminar is based on an older version of Bizinikiwi, and <a href="https://docs.rs/clap/latest/clap/">Clap</a>
|
||||
is now used instead of <a href="https://docs.rs/structopt/latest/structopt/">StructOpt</a> for parsing
|
||||
CLI arguments.</p>
|
||||
</blockquote>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {};
|
||||
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Learn about how to add custom host functions to the node."><title>pezkuwi_sdk_docs::reference_docs::custom_host_functions - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module custom_host_functions</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module custom_<wbr>host_<wbr>functions</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#custom-host-functions" title="Custom Host Functions">Custom Host Functions</a><ul><li><a href="#finding-host-functions" title="Finding Host Functions">Finding Host Functions</a></li><li><a href="#adding-new-host-functions" title="Adding New Host Functions">Adding New Host Functions</a></li></ul></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../index.html">reference_docs</a></div><h1>Module <span>custom_<wbr>host_<wbr>functions</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/pezkuwi_sdk_docs/reference_docs/custom_host_functions.rs.html#1-27">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Learn about how to add custom host functions to the node.</p>
|
||||
<h2 id="custom-host-functions"><a class="doc-anchor" href="#custom-host-functions">§</a>Custom Host Functions</h2>
|
||||
<p>Host functions are functions that the wasm instance can use to communicate with the node. Learn
|
||||
more about this in <a href="../wasm_meta_protocol/index.html" title="mod pezkuwi_sdk_docs::reference_docs::wasm_meta_protocol"><code>crate::reference_docs::wasm_meta_protocol</code></a>.</p>
|
||||
<h3 id="finding-host-functions"><a class="doc-anchor" href="#finding-host-functions">§</a>Finding Host Functions</h3>
|
||||
<p>To declare a set of functions as host functions, you need to use the <code>#[runtime_interface]</code>
|
||||
([<code>pezsp_runtime_interface</code>]) attribute macro. The most notable set of host functions are those
|
||||
that allow the runtime to access the chain state, namely [<code>pezsp_io::storage</code>]. Some other
|
||||
notable host functions are also defined in [<code>pezsp_io</code>].</p>
|
||||
<h3 id="adding-new-host-functions"><a class="doc-anchor" href="#adding-new-host-functions">§</a>Adding New Host Functions</h3>
|
||||
<blockquote>
|
||||
<p>Adding a new host function is a big commitment and should be done with care. Namely, the nodes
|
||||
in the network need to support all host functions forever in order to be able to sync
|
||||
historical blocks.</p>
|
||||
</blockquote>
|
||||
<p>Adding host functions is only possible when you are using a node-template, so that you have
|
||||
access to the boilerplate of building your node.</p>
|
||||
<p>A group of host functions can always be grouped to gether as a tuple:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="attr">#[cfg(not(bizinikiwi_runtime))]
|
||||
</span><span class="kw">pub type </span>BizinikiwiHostFunctions = (
|
||||
storage::HostFunctions,
|
||||
default_child_storage::HostFunctions,
|
||||
misc::HostFunctions,
|
||||
wasm_tracing::HostFunctions,
|
||||
offchain::HostFunctions,
|
||||
crypto::HostFunctions,
|
||||
hashing::HostFunctions,
|
||||
allocator::HostFunctions,
|
||||
panic_handler::HostFunctions,
|
||||
logging::HostFunctions,
|
||||
<span class="kw">crate</span>::trie::HostFunctions,
|
||||
offchain_index::HostFunctions,
|
||||
transaction_index::HostFunctions,
|
||||
);</code></pre></div>
|
||||
<p>The host functions are attached to the node side’s [<code>pezsc_executor::WasmExecutor</code>]. For example
|
||||
in the minimal template, the setup looks as follows:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">type </span>FullClient =
|
||||
pezsc_service::TFullClient<Block, RuntimeApi, WasmExecutor<HostFunctions>>;</code></pre></div></div></details></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {};
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Learn about how to create custom RPC endpoints and runtime APIs."><title>pezkuwi_sdk_docs::reference_docs::custom_runtime_api_rpc - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module custom_runtime_api_rpc</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module custom_<wbr>runtime_<wbr>api_<wbr>rpc</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#custom-rpc-dos-and-donts" title="Custom RPC do’s and don’ts">Custom RPC do’s and don’ts</a><ul><li><a href="#background" title="Background">Background</a></li><li><a href="#problems-with-custom-rpc" title="Problems with Custom RPC">Problems with Custom RPC</a></li><li><a href="#alternatives" title="Alternatives">Alternatives</a></li><li><a href="#create-a-new-runtime-api" title="Create a new Runtime API">Create a new Runtime API</a></li><li><a href="#create-a-new-custom-rpc-legacy" title="Create a new custom RPC (Legacy)">Create a new custom RPC (Legacy)</a></li><li><a href="#add-a-new-rpc-to-the-node-legacy" title="Add a new RPC to the node (Legacy)">Add a new RPC to the node (Legacy)</a></li><li><a href="#future" title="Future">Future</a></li></ul></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../index.html">reference_docs</a></div><h1>Module <span>custom_<wbr>runtime_<wbr>api_<wbr>rpc</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/pezkuwi_sdk_docs/reference_docs/custom_runtime_api_rpc.rs.html#1-77">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Learn about how to create custom RPC endpoints and runtime APIs.</p>
|
||||
<h2 id="custom-rpc-dos-and-donts"><a class="doc-anchor" href="#custom-rpc-dos-and-donts">§</a>Custom RPC do’s and don’ts</h2>
|
||||
<p><strong>TLDR:</strong> Don’t create new custom RPCs. Instead, rely on custom Runtime APIs, combined with
|
||||
<code>state_call</code>.</p>
|
||||
<h3 id="background"><a class="doc-anchor" href="#background">§</a>Background</h3>
|
||||
<p>Pezkuwi-SDK offers the ability to query and subscribe storages directly. However what it does
|
||||
not have is <a href="https://github.com/pezkuwichain/pezkuwi-sdk/issues/247">view functions</a>. This is an
|
||||
essential feature to avoid duplicated logic between runtime and the client SDK. Custom RPC was
|
||||
used as a solution. It allow the RPC node to expose new RPCs that clients can be used to query
|
||||
computed properties.</p>
|
||||
<h3 id="problems-with-custom-rpc"><a class="doc-anchor" href="#problems-with-custom-rpc">§</a>Problems with Custom RPC</h3>
|
||||
<p>Unfortunately, custom RPC comes with many problems. To list a few:</p>
|
||||
<ul>
|
||||
<li>It is offchain logic executed by the RPC node and therefore the client has to trust the RPC
|
||||
node.</li>
|
||||
<li>To upgrade or add a new RPC logic, the RPC node has to be upgraded. This can cause significant
|
||||
trouble when the RPC infrastructure is decentralized as we will need to coordinate multiple
|
||||
parties to upgrade the RPC nodes.</li>
|
||||
<li>A lot of boilerplate code is required to add custom RPC.</li>
|
||||
<li>It prevents dApps from using a light client or an alternative client.</li>
|
||||
<li>It makes ecosystem tooling integration much more complicated. For example, dApps will not
|
||||
be able to use <a href="https://github.com/AcalaNetwork/chopsticks">Chopsticks</a> for testing as
|
||||
Chopsticks will not have the custom RPC implementation.</li>
|
||||
<li>Poorly implemented custom RPC can be a DoS vector.</li>
|
||||
</ul>
|
||||
<p>Hence, we should avoid custom RPC.</p>
|
||||
<h3 id="alternatives"><a class="doc-anchor" href="#alternatives">§</a>Alternatives</h3>
|
||||
<p>Generally, [<code>pezsc_rpc::state::StateBackend::call</code>] aka. <code>state_call</code> should be used instead of
|
||||
custom RPC.</p>
|
||||
<p>Usually, each custom RPC comes with a corresponding runtime API which implements the business
|
||||
logic. So instead of invoke the custom RPC, we can use <code>state_call</code> to invoke the runtime API
|
||||
directly. This is a trivial change on the dApp and no change on the runtime side. We may remove
|
||||
the custom RPC from the node side if wanted.</p>
|
||||
<p>There are some other cases that a simple runtime API is not enough. For example, implementation
|
||||
of Ethereum RPC requires an additional offchain database to index transactions. In this
|
||||
particular case, we can have the RPC implemented on another client.</p>
|
||||
<p>For example, the Acala EVM+ RPC are implemented by
|
||||
<a href="https://github.com/AcalaNetwork/bodhi.js/tree/master/packages/eth-rpc-adapter">eth-rpc-adapter</a>.
|
||||
Alternatively, the <a href="https://github.com/pezkuwi-evm/frontier">Frontier</a> project also provided
|
||||
Ethereum RPC compatibility directly in the node-side software.</p>
|
||||
<h3 id="create-a-new-runtime-api"><a class="doc-anchor" href="#create-a-new-runtime-api">§</a>Create a new Runtime API</h3>
|
||||
<p>For example, let’s take a look at the process through which the account nonce can be queried
|
||||
through an RPC. First, a new runtime-api needs to be declared:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="macro">pezsp_api::decl_runtime_apis!</span> {
|
||||
<span class="doccomment">/// The API to query account nonce.
|
||||
</span><span class="kw">pub trait </span>AccountNonceApi<AccountId, Nonce> <span class="kw">where
|
||||
</span>AccountId: codec::Codec,
|
||||
Nonce: codec::Codec,
|
||||
{
|
||||
<span class="doccomment">/// Get current account nonce of given `AccountId`.
|
||||
</span><span class="kw">fn </span>account_nonce(account: AccountId) -> Nonce;
|
||||
}
|
||||
}</code></pre></div>
|
||||
<p>This API is implemented at the runtime level, always inside [<code>pezsp_api::impl_runtime_apis!</code>].</p>
|
||||
<p>As noted, this is already enough to make this API usable via <code>state_call</code>.</p>
|
||||
<h3 id="create-a-new-custom-rpc-legacy"><a class="doc-anchor" href="#create-a-new-custom-rpc-legacy">§</a>Create a new custom RPC (Legacy)</h3>
|
||||
<p>Should you wish to implement the legacy approach of exposing this runtime-api as a custom
|
||||
RPC-api, then a custom RPC server has to be defined.</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="attr">#[rpc(client, server)]
|
||||
</span><span class="kw">pub trait </span>SystemApi<BlockHash, AccountId, Nonce> {
|
||||
<span class="doccomment">/// Returns the next valid index (aka nonce) for given account.
|
||||
///
|
||||
/// This method takes into consideration all pending transactions
|
||||
/// currently in the pool and if no transactions are found in the pool
|
||||
/// it fallbacks to query the index from the runtime (aka. state nonce).
|
||||
</span><span class="attr">#[method(name = <span class="string">"system_accountNextIndex"</span>, aliases = [<span class="string">"account_nextIndex"</span>]</span>)]
|
||||
<span class="kw">async fn </span>nonce(<span class="kw-2">&</span><span class="self">self</span>, account: AccountId) -> RpcResult<Nonce>;
|
||||
|
||||
<span class="doccomment">/// Dry run an extrinsic at a given block. Return SCALE encoded ApplyExtrinsicResult.
|
||||
</span><span class="attr">#[method(name = <span class="string">"system_dryRun"</span>, aliases = [<span class="string">"system_dryRunAt"</span>]</span>, with_extensions)]
|
||||
<span class="kw">async fn </span>dry_run(<span class="kw-2">&</span><span class="self">self</span>, extrinsic: Bytes, at: <span class="prelude-ty">Option</span><BlockHash>) -> RpcResult<Bytes>;
|
||||
}</code></pre></div><h3 id="add-a-new-rpc-to-the-node-legacy"><a class="doc-anchor" href="#add-a-new-rpc-to-the-node-legacy">§</a>Add a new RPC to the node (Legacy)</h3>
|
||||
<p>Finally, this custom RPC needs to be integrated into the node side. This is usually done in a
|
||||
<code>rpc.rs</code> in a typical template, as follows:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">pub fn </span>create_full<C, P>(
|
||||
deps: FullDeps<C, P>,
|
||||
) -> <span class="prelude-ty">Result</span><RpcModule<()>, Box<<span class="kw">dyn </span>std::error::Error + Send + Sync>>
|
||||
<span class="kw">where
|
||||
</span>C: Send
|
||||
+ Sync
|
||||
+ <span class="lifetime">'static
|
||||
</span>+ pezkuwi_sdk::pezsp_api::ProvideRuntimeApi<OpaqueBlock>
|
||||
+ HeaderBackend<OpaqueBlock>
|
||||
+ HeaderMetadata<OpaqueBlock, Error = BlockChainError>
|
||||
+ <span class="lifetime">'static</span>,
|
||||
C::Api: pezkuwi_sdk::pezsp_block_builder::BlockBuilder<OpaqueBlock>,
|
||||
C::Api: bizinikiwi_frame_rpc_system::AccountNonceApi<OpaqueBlock, AccountId, Nonce>,
|
||||
P: TransactionPool + <span class="lifetime">'static</span>,
|
||||
{
|
||||
<span class="kw">use </span>pezkuwi_sdk::bizinikiwi_frame_rpc_system::{System, SystemApiServer};
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>module = RpcModule::new(());
|
||||
<span class="kw">let </span>FullDeps { client, pool } = deps;
|
||||
|
||||
module.merge(System::new(client.clone(), pool.clone()).into_rpc())<span class="question-mark">?</span>;
|
||||
|
||||
<span class="prelude-val">Ok</span>(module)
|
||||
}</code></pre></div><h3 id="future"><a class="doc-anchor" href="#future">§</a>Future</h3>
|
||||
<ul>
|
||||
<li><a href="https://forum.network.pezkuwichain.io/t/cross-consensus-query-language-xcq/7583">XCQ</a> will be a good
|
||||
solution for most of the query needs.</li>
|
||||
<li><a href="https://github.com/paritytech/json-rpc-interface-spec">New JSON-RPC Specification</a></li>
|
||||
</ul>
|
||||
</div></details></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {};
|
||||
@@ -0,0 +1,270 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Learn about how to write safe and defensive code in your FRAME runtime. Defensive programming is a design paradigm that enables a program to continue running despite unexpected behavior, input, or events that may arise in runtime. Usually, unforeseen circumstances may cause the program to stop or, in the Rust context, `panic!`. Defensive practices allow for these circumstances to be accounted for ahead of time and for them to be handled gracefully, which is in line with the intended fault-tolerant and deterministic nature of blockchains."><title>pezkuwi_sdk_docs::reference_docs::defensive_programming - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module defensive_programming</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module defensive_<wbr>programming</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#general-overview" title="General Overview">General Overview</a><ul><li><a href="#defensive-traits" title="Defensive Traits">Defensive Traits</a></li></ul></li><li><a href="#integer-overflow" title="Integer Overflow">Integer Overflow</a></li><li><a href="#infallible-arithmetic" title="Infallible Arithmetic">Infallible Arithmetic</a><ul><li><a href="#checked-arithmetic" title="Checked Arithmetic">Checked Arithmetic</a></li><li><a href="#saturating-operations" title="Saturating Operations">Saturating Operations</a></li><li><a href="#mathematical-operations-in-bizinikiwi-development---further-context" title="Mathematical Operations in Bizinikiwi Development - Further Context">Mathematical Operations in Bizinikiwi Development - Further Context</a></li><li><a href="#edge-cases-of-panic-able-instances-in-bizinikiwi" title="Edge cases of `panic!`-able instances in Bizinikiwi">Edge cases of <code>panic!</code>-able instances in Bizinikiwi</a></li></ul></li><li><a href="#other-resources" title="Other Resources">Other Resources</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../index.html">reference_docs</a></div><h1>Module <span>defensive_<wbr>programming</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/pezkuwi_sdk_docs/reference_docs/defensive_programming.rs.html#16-396">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Learn about how to write safe and defensive code in your FRAME runtime.
|
||||
<a href="https://en.wikipedia.org/wiki/Defensive_programming">Defensive programming</a> is a design paradigm that enables a program to continue
|
||||
running despite unexpected behavior, input, or events that may arise in runtime.
|
||||
Usually, unforeseen circumstances may cause the program to stop or, in the Rust context,
|
||||
<code>panic!</code>. Defensive practices allow for these circumstances to be accounted for ahead of time
|
||||
and for them to be handled gracefully, which is in line with the intended fault-tolerant and
|
||||
deterministic nature of blockchains.</p>
|
||||
<p>The Pezkuwi SDK is built to reflect these principles and to facilitate their usage accordingly.</p>
|
||||
<h3 id="general-overview"><a class="doc-anchor" href="#general-overview">§</a>General Overview</h3>
|
||||
<p>When developing within the context of the Bizinikiwi runtime, there is one golden rule:</p>
|
||||
<p><em><strong>DO NOT PANIC</strong></em>. There are some exceptions, but generally, this is the default precedent.</p>
|
||||
<blockquote>
|
||||
<p>It’s important to differentiate between the runtime and node. The runtime refers to the core
|
||||
business logic of a Bizinikiwi-based chain, whereas the node refers to the outer client, which
|
||||
deals with telemetry and gossip from other nodes. For more information, read about
|
||||
<a href="../wasm_meta_protocol/index.html#node-vs-runtime" title="mod pezkuwi_sdk_docs::reference_docs::wasm_meta_protocol">Bizinikiwi’s node
|
||||
architecture</a>. It’s also important
|
||||
to note that the criticality of the node is slightly lesser
|
||||
than that of the runtime, which is why you may see <code>unwrap()</code> or other “non-defensive”
|
||||
approaches
|
||||
in a few places of the node’s code repository.</p>
|
||||
</blockquote>
|
||||
<p>Most of these practices fall within Rust’s
|
||||
colloquial usage of proper error propagation, handling, and arithmetic-based edge cases.</p>
|
||||
<p>General guidelines:</p>
|
||||
<ul>
|
||||
<li><strong>Avoid writing functions that could explicitly panic,</strong> such as directly using <code>unwrap()</code> on
|
||||
a <a href="https://doc.rust-lang.org/1.91.1/core/result/enum.Result.html" title="enum core::result::Result"><code>Result</code></a>, or accessing an out-of-bounds index on a collection. Safer methods to access
|
||||
collection types, i.e., <code>get()</code> which allow defensive handling of the resulting <a href="https://doc.rust-lang.org/1.91.1/core/option/enum.Option.html" title="enum core::option::Option"><code>Option</code></a> are
|
||||
recommended to be used.</li>
|
||||
<li><strong>It may be acceptable to use <code>except()</code>,</strong> but only if one is completely certain (and has
|
||||
performed a check beforehand) that a value won’t panic upon unwrapping. <em>Even this is
|
||||
discouraged</em>, however, as future changes to that function could then cause that statement to
|
||||
panic. It is important to ensure all possible errors are propagated and handled effectively.</li>
|
||||
<li><strong>If a function <em>can</em> panic,</strong> it usually is prefaced with <code>unchecked_</code> to indicate its
|
||||
unsafety.</li>
|
||||
<li><strong>If you are writing a function that could panic,</strong> <a href="https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html#documenting-components">document it!</a></li>
|
||||
<li><strong>Carefully handle mathematical operations.</strong> Many seemingly, simplistic operations, such as
|
||||
<strong>arithmetic</strong> in the runtime, could present a number of issues <a href="#integer-overflow">(see more later in this
|
||||
document)</a>. Use checked arithmetic wherever possible.</li>
|
||||
</ul>
|
||||
<p>These guidelines could be summarized in the following example, where <code>bad_pop</code> is prone to
|
||||
panicking, and <code>good_pop</code> allows for proper error handling to take place:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code> <span class="comment">// Bad pop always requires that we return something, even if vector/array is empty.
|
||||
</span><span class="kw">fn </span>bad_pop<T>(v: Vec<T>) -> T {}
|
||||
<span class="comment">// Good pop allows us to return None from the Option if need be.
|
||||
</span><span class="kw">fn </span>good_pop<T>(v: Vec<T>) -> <span class="prelude-ty">Option</span><T> {}</code></pre></div><h4 id="defensive-traits"><a class="doc-anchor" href="#defensive-traits">§</a>Defensive Traits</h4>
|
||||
<p>The <a href="pezframe::traits::Defensive"><code>Defensive</code></a> trait provides a number of functions, all of which
|
||||
provide an alternative to ‘vanilla’ Rust functions, e.g.:</p>
|
||||
<ul>
|
||||
<li><a href="pezframe::traits::Defensive::defensive_unwrap_or"><code>defensive_unwrap_or()</code></a> instead of
|
||||
<code>unwrap_or()</code></li>
|
||||
<li><a href="pezframe::traits::DefensiveOption::defensive_ok_or"><code>defensive_ok_or()</code></a> instead of <code>ok_or()</code></li>
|
||||
</ul>
|
||||
<p>Defensive methods use <a href="https://doc.rust-lang.org/reference/conditional-compilation.html#debug_assertions"><code>debug_assertions</code></a>, which panic in development, but in
|
||||
production/release, they will merely log an error (i.e., <code>log::error</code>).</p>
|
||||
<p>The <a href="pezframe::traits::Defensive"><code>Defensive</code></a> trait and its various implementations can be found
|
||||
<a href="pezframe::traits::Defensive">here</a>.</p>
|
||||
<h3 id="integer-overflow"><a class="doc-anchor" href="#integer-overflow">§</a>Integer Overflow</h3>
|
||||
<p>The Rust compiler prevents static overflow from happening at compile time.
|
||||
The compiler panics in <strong>debug</strong> mode in the event of an integer overflow. In
|
||||
<strong>release</strong> mode, it resorts to silently <em>wrapping</em> the overflowed amount in a modular fashion
|
||||
(from the <code>MAX</code> back to zero).</p>
|
||||
<p>In runtime development, we don’t always have control over what is being supplied
|
||||
as a parameter. For example, even this simple add function could present one of two outcomes
|
||||
depending on whether it is in <strong>release</strong> or <strong>debug</strong> mode:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">fn </span>naive_add(x: u8, y: u8) -> u8 {
|
||||
x + y
|
||||
}</code></pre></div>
|
||||
<p>If we passed overflow-able values at runtime, this could panic (or wrap if in release).</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code>naive_add(<span class="number">250u8</span>, <span class="number">10u8</span>); <span class="comment">// In debug mode, this would panic. In release, this would return 4.</span></code></pre></div>
|
||||
<p>It is the silent portion of this behavior that presents a real issue. Such behavior should be
|
||||
made obvious, especially in blockchain development, where unsafe arithmetic could produce
|
||||
unexpected consequences like a user balance over or underflowing.</p>
|
||||
<p>Fortunately, there are ways to both represent and handle these scenarios depending on our
|
||||
specific use case natively built into Rust and libraries like [<code>pezsp_arithmetic</code>].</p>
|
||||
<h3 id="infallible-arithmetic"><a class="doc-anchor" href="#infallible-arithmetic">§</a>Infallible Arithmetic</h3>
|
||||
<p>Both Rust and Bizinikiwi provide safe ways to deal with numbers and alternatives to floating
|
||||
point arithmetic.</p>
|
||||
<p>Known scenarios that could be fallible should be avoided: i.e., avoiding the possibility of
|
||||
dividing/modulo by zero at any point should be mitigated. One should be opting for a
|
||||
<code>checked_*</code> method to introduce safe arithmetic in their code in most cases.</p>
|
||||
<p>A developer should use fixed-point instead of floating-point arithmetic to mitigate the
|
||||
potential for inaccuracy, rounding errors, or other unexpected behavior.</p>
|
||||
<ul>
|
||||
<li><a href="pezsp_arithmetic::fixed_point">Fixed point types</a> and their associated usage can be found
|
||||
here.</li>
|
||||
<li><a href="pezsp_arithmetic::per_things">PerThing</a> and its associated types can be found here.</li>
|
||||
</ul>
|
||||
<p>Using floating point number types (i.e. f32, f64) in the runtime should be avoided, as a single non-deterministic result could cause chaos for blockchain consensus along with the issues above. For more on the specifics of the peculiarities of floating point calculations, <a href="https://www.youtube.com/watch?v=PZRI1IfStY0">watch this video by the Computerphile</a>.</p>
|
||||
<p>The following methods demonstrate different ways to handle numbers natively in Rust safely,
|
||||
without fear of panic or unexpected behavior from wrapping.</p>
|
||||
<h4 id="checked-arithmetic"><a class="doc-anchor" href="#checked-arithmetic">§</a>Checked Arithmetic</h4>
|
||||
<p><strong>Checked operations</strong> utilize an <code>Option<T></code> as a return type. This allows for
|
||||
catching any unexpected behavior in the event of an overflow through simple pattern matching.</p>
|
||||
<p>This is an example of a valid operation:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="attr">#[test]
|
||||
</span><span class="kw">fn </span>checked_add_example() {
|
||||
<span class="comment">// This is valid, as 20 is perfectly within the bounds of u32.
|
||||
</span><span class="kw">let </span>add = (<span class="number">10u32</span>).checked_add(<span class="number">10</span>);
|
||||
<span class="macro">assert_eq!</span>(add, <span class="prelude-val">Some</span>(<span class="number">20</span>))
|
||||
}</code></pre></div>
|
||||
<p>This is an example of an invalid operation. In this case, a simulated integer overflow, which
|
||||
would simply result in <code>None</code>:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="attr">#[test]
|
||||
</span><span class="kw">fn </span>checked_add_handle_error_example() {
|
||||
<span class="comment">// This is invalid - we are adding something to the max of u32::MAX, which would overflow.
|
||||
// Luckily, checked_add just marks this as None!
|
||||
</span><span class="kw">let </span>add = u32::MAX.checked_add(<span class="number">10</span>);
|
||||
<span class="macro">assert_eq!</span>(add, <span class="prelude-val">None</span>)
|
||||
}</code></pre></div>
|
||||
<p>Suppose you aren’t sure which operation to use for runtime math. In that case, checked
|
||||
operations are the safest bet, presenting two predictable (and erroring) outcomes that can be
|
||||
handled accordingly (Some and None).</p>
|
||||
<p>The following conventions can be seen within the Pezkuwi SDK, where it is
|
||||
handled in two ways:</p>
|
||||
<ul>
|
||||
<li>As an <a href="https://doc.rust-lang.org/1.91.1/core/option/enum.Option.html" title="enum core::option::Option"><code>Option</code></a>, using the <code>if let</code> / <code>if</code> or <code>match</code></li>
|
||||
<li>As a <a href="https://doc.rust-lang.org/1.91.1/core/result/enum.Result.html" title="enum core::result::Result"><code>Result</code></a>, via <code>ok_or</code> (or similar conversion to <a href="https://doc.rust-lang.org/1.91.1/core/result/enum.Result.html" title="enum core::result::Result"><code>Result</code></a> from <a href="https://doc.rust-lang.org/1.91.1/core/option/enum.Option.html" title="enum core::option::Option"><code>Option</code></a>)</li>
|
||||
</ul>
|
||||
<h5 id="handling-via-option---more-verbose"><a class="doc-anchor" href="#handling-via-option---more-verbose">§</a>Handling via Option - More Verbose</h5>
|
||||
<p>Because wrapped operations return <code>Option<T></code>, you can use a more verbose/explicit form of error
|
||||
handling via <code>if</code> or <code>if let</code>:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">fn </span>increase_balance(account: Address, amount: u64) -> <span class="prelude-ty">Result</span><(), RuntimeError> {
|
||||
<span class="comment">// Get a user's current balance
|
||||
</span><span class="kw">let </span>balance = Runtime::get_balance(account)<span class="question-mark">?</span>;
|
||||
<span class="comment">// SAFELY increase the balance by some amount
|
||||
</span><span class="kw">if let </span><span class="prelude-val">Some</span>(new_balance) = balance.checked_add(amount) {
|
||||
Runtime::set_balance(account, new_balance);
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
} <span class="kw">else </span>{
|
||||
<span class="prelude-val">Err</span>(RuntimeError::Overflow)
|
||||
}
|
||||
}</code></pre></div>
|
||||
<p>Optionally, match may also be directly used in a more concise manner:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">fn </span>increase_balance_match(account: Address, amount: u64) -> <span class="prelude-ty">Result</span><(), RuntimeError> {
|
||||
<span class="comment">// Get a user's current balance
|
||||
</span><span class="kw">let </span>balance = Runtime::get_balance(account)<span class="question-mark">?</span>;
|
||||
<span class="comment">// SAFELY increase the balance by some amount
|
||||
</span><span class="kw">let </span>new_balance = <span class="kw">match </span>balance.checked_add(amount) {
|
||||
<span class="prelude-val">Some</span>(balance) => balance,
|
||||
<span class="prelude-val">None </span>=> {
|
||||
<span class="kw">return </span><span class="prelude-val">Err</span>(RuntimeError::Overflow);
|
||||
},
|
||||
};
|
||||
Runtime::set_balance(account, new_balance);
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}</code></pre></div>
|
||||
<p>This is generally a useful convention for handling checked types and most types that return
|
||||
<code>Option<T></code>.</p>
|
||||
<h5 id="handling-via-result---less-verbose"><a class="doc-anchor" href="#handling-via-result---less-verbose">§</a>Handling via Result - Less Verbose</h5>
|
||||
<p>In the Pezkuwi SDK codebase, checked operations are handled as a <code>Result</code> via <code>ok_or</code>. This is
|
||||
a less verbose way of expressing the above. This usage often boils down to the developer’s
|
||||
preference:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">fn </span>increase_balance_result(account: Address, amount: u64) -> <span class="prelude-ty">Result</span><(), RuntimeError> {
|
||||
<span class="comment">// Get a user's current balance
|
||||
</span><span class="kw">let </span>balance = Runtime::get_balance(account)<span class="question-mark">?</span>;
|
||||
<span class="comment">// SAFELY increase the balance by some amount - this time, by using `ok_or`
|
||||
</span><span class="kw">let </span>new_balance = balance.checked_add(amount).ok_or(RuntimeError::Overflow)<span class="question-mark">?</span>;
|
||||
Runtime::set_balance(account, new_balance);
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}</code></pre></div><h4 id="saturating-operations"><a class="doc-anchor" href="#saturating-operations">§</a>Saturating Operations</h4>
|
||||
<p>Saturating a number limits it to the type’s upper or lower bound, even if the integer type
|
||||
overflowed in runtime. For example, adding to <code>u32::MAX</code> would simply limit itself to
|
||||
<code>u32::MAX</code>:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="attr">#[test]
|
||||
</span><span class="kw">fn </span>saturated_add_example() {
|
||||
<span class="comment">// Saturating add simply saturates
|
||||
// to the numeric bound of that type if it overflows.
|
||||
</span><span class="kw">let </span>add = u32::MAX.saturating_add(<span class="number">10</span>);
|
||||
<span class="macro">assert_eq!</span>(add, u32::MAX)
|
||||
}</code></pre></div>
|
||||
<p>Saturating calculations can be used if one is very sure that something won’t overflow, but wants
|
||||
to avoid introducing the notion of any potential-panic or wrapping behavior.</p>
|
||||
<p>There is also a series of defensive alternatives via
|
||||
<a href="pezframe::traits::DefensiveSaturating"><code>DefensiveSaturating</code></a>, which introduces the same behavior
|
||||
of the <a href="pezframe::traits::Defensive"><code>Defensive</code></a> trait, only with saturating, mathematical
|
||||
operations:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="attr">#[test]
|
||||
#[cfg_attr(debug_assertions, should_panic(expected = <span class="string">"Defensive failure has been triggered!"</span>))]
|
||||
</span><span class="kw">fn </span>saturated_defensive_example() {
|
||||
<span class="kw">let </span>saturated_defensive = u32::MAX.defensive_saturating_add(<span class="number">10</span>);
|
||||
<span class="macro">assert_eq!</span>(saturated_defensive, u32::MAX);
|
||||
}</code></pre></div><h4 id="mathematical-operations-in-bizinikiwi-development---further-context"><a class="doc-anchor" href="#mathematical-operations-in-bizinikiwi-development---further-context">§</a>Mathematical Operations in Bizinikiwi Development - Further Context</h4>
|
||||
<p>As a recap, we covered the following concepts:</p>
|
||||
<ol>
|
||||
<li><strong>Checked</strong> operations - using <a href="https://doc.rust-lang.org/1.91.1/core/option/enum.Option.html" title="enum core::option::Option"><code>Option</code></a> or <a href="https://doc.rust-lang.org/1.91.1/core/result/enum.Result.html" title="enum core::result::Result"><code>Result</code></a></li>
|
||||
<li><strong>Saturating</strong> operations - limited to the lower and upper bounds of a number type</li>
|
||||
<li><strong>Wrapped</strong> operations (the default) - wrap around to above or below the bounds of a type</li>
|
||||
</ol>
|
||||
<h5 id="the-problem-with-default-wrapped-operations"><a class="doc-anchor" href="#the-problem-with-default-wrapped-operations">§</a>The problem with ‘default’ wrapped operations</h5>
|
||||
<p><strong>Wrapped operations</strong> cause the overflow to wrap around to either the maximum or minimum of
|
||||
that type. Imagine this in the context of a blockchain, where there are account balances, voting
|
||||
counters, nonces for transactions, and other aspects of a blockchain.</p>
|
||||
<p>While it may seem trivial, choosing how to handle numbers is quite important. As a thought
|
||||
exercise, here are some scenarios of which will shed more light on when to use which.</p>
|
||||
<h5 id="bobs-overflowed-balance"><a class="doc-anchor" href="#bobs-overflowed-balance">§</a>Bob’s Overflowed Balance</h5>
|
||||
<p><strong>Bob’s</strong> balance exceeds the <code>Balance</code> type on the <code>EduChain</code>. Because the pezpallet developer
|
||||
did not handle the calculation to add to Bob’s balance with any regard to this overflow,
|
||||
<strong>Bob’s</strong> balance is now essentially <code>0</code>, the operation <strong>wrapped</strong>.</p>
|
||||
<details>
|
||||
<summary><b>Solution: Saturating or Checked</b></summary>
|
||||
For Bob's balance problems, using a `saturating_add` or `checked_add` could've mitigated
|
||||
this issue. They simply would've reached the upper, or lower bounds, of the particular type for
|
||||
an on-chain balance. In other words: Bob's balance would've stayed at the maximum of the
|
||||
Balance type. </details>
|
||||
<h5 id="alices-underflowed-balance"><a class="doc-anchor" href="#alices-underflowed-balance">§</a>Alice’s ‘Underflowed’ Balance</h5>
|
||||
<p>Alice’s balance has reached <code>0</code> after a transfer to Bob. Suddenly, she has been slashed on
|
||||
EduChain, causing her balance to reach near the limit of <code>u32::MAX</code> - a very large amount - as
|
||||
wrapped operations can go both ways. Alice can now successfully vote using her new, overpowered
|
||||
token balance, destroying the chain’s integrity.</p>
|
||||
<details>
|
||||
<summary><b>Solution: Saturating</b></summary>
|
||||
For Alice's balance problem, using `saturated_sub` could've mitigated this issue. A saturating
|
||||
calculation would've simply limited her balance to the lower bound of u32, as having a negative
|
||||
balance is not a concept within blockchains. In other words: Alice's balance would've stayed
|
||||
at "0", even after being slashed.
|
||||
<p>This is also an example that while one system may work in isolation, shared interfaces, such
|
||||
as the notion of balances, are often shared across multiple pallets - meaning these small
|
||||
changes can make a big difference depending on the scenario. </details></p>
|
||||
<h5 id="proposal-id-overwrite"><a class="doc-anchor" href="#proposal-id-overwrite">§</a>Proposal ID Overwrite</h5>
|
||||
<p>A <code>u8</code> parameter, called <code>proposals_count</code>, represents the type for counting the number of
|
||||
proposals on-chain. Every time a new proposal is added to the system, this number increases.
|
||||
With the proposal pezpallet’s high usage, it has reached <code>u8::MAX</code>’s limit of 255, causing
|
||||
<code>proposals_count</code> to go to 0. Unfortunately, this results in new proposals overwriting old ones,
|
||||
effectively erasing any notion of past proposals!</p>
|
||||
<details>
|
||||
<summary><b>Solution: Checked</b></summary>
|
||||
For the proposal IDs, proper handling via `checked` math would've been suitable,
|
||||
Saturating could've been used - but it also would've 'failed' silently. Using `checked_add` to
|
||||
ensure that the next proposal ID would've been valid would've been a viable way to let the user
|
||||
know the state of their proposal:
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">let </span>next_proposal_id = current_count.checked_add(<span class="number">1</span>).ok_or_else(|| Error::TooManyProposals)<span class="question-mark">?</span>;</code></pre></div> </details>
|
||||
<p>From the above, we can clearly see the problematic nature of seemingly simple operations in the
|
||||
runtime, and care should be given to ensure a defensive approach is taken.</p>
|
||||
<h4 id="edge-cases-of-panic-able-instances-in-bizinikiwi"><a class="doc-anchor" href="#edge-cases-of-panic-able-instances-in-bizinikiwi">§</a>Edge cases of <code>panic!</code>-able instances in Bizinikiwi</h4>
|
||||
<p>As you traverse through the codebase (particularly in <code>bizinikiwi/frame</code>, where the majority of
|
||||
runtime code lives), you may notice that there (only a few!) occurrences where <code>panic!</code> is used
|
||||
explicitly. This is used when the runtime should stall, rather than keep running, as that is
|
||||
considered safer. Particularly when it comes to mission-critical components, such as block
|
||||
authoring, consensus, or other protocol-level dependencies, going through with an action may
|
||||
actually cause harm to the network, and thus stalling would be the better option.</p>
|
||||
<p>Take the example of the BABE pezpallet ([<code>pezpallet_babe</code>]), which doesn’t allow for a validator
|
||||
to participate if it is disabled (see: [<code>pezframe::traits::DisabledValidators</code>]):</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">if </span>T::DisabledValidators::is_disabled(authority_index) {
|
||||
<span class="macro">panic!</span>(
|
||||
<span class="string">"Validator with index {:?} is disabled and should not be attempting to author blocks."</span>,
|
||||
authority_index,
|
||||
);
|
||||
}</code></pre></div>
|
||||
<p>There are other examples in various pallets, mostly those crucial to the blockchain’s
|
||||
functionality. Most of the time, you will not be writing pallets which operate at this level,
|
||||
but these exceptions should be noted regardless.</p>
|
||||
<h3 id="other-resources"><a class="doc-anchor" href="#other-resources">§</a>Other Resources</h3>
|
||||
<ul>
|
||||
<li><a href="https://www.youtube.com/playlist?list=PL-w_i5kwVqbni1Ch2j_RwTIXiB-bwnYqq">PBA Lectures on YouTube</a></li>
|
||||
</ul>
|
||||
</div></details></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {};
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Advice for configuring your development environment for Bizinikiwi development."><title>pezkuwi_sdk_docs::reference_docs::development_environment_advice - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module development_environment_advice</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module development_<wbr>environment_<wbr>advice</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#development-environment-advice" title="Development Environment Advice">Development Environment Advice</a><ul><li><a href="#rust-analyzer-configuration" title="Rust Analyzer Configuration">Rust Analyzer Configuration</a></li><li><a href="#cargo-usage" title="Cargo Usage">Cargo Usage</a></li></ul></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../index.html">reference_docs</a></div><h1>Module <span>development_<wbr>environment_<wbr>advice</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/pezkuwi_sdk_docs/reference_docs/development_environment_advice.rs.html#1-223">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Advice for configuring your development environment for Bizinikiwi development.</p>
|
||||
<h2 id="development-environment-advice"><a class="doc-anchor" href="#development-environment-advice">§</a>Development Environment Advice</h2>
|
||||
<p>Large Rust projects are known for sometimes long compile times and sluggish dev tooling, and
|
||||
pezkuwi-sdk is no exception.</p>
|
||||
<p>This page contains some advice to improve your workflow when using common tooling.</p>
|
||||
<h3 id="rust-analyzer-configuration"><a class="doc-anchor" href="#rust-analyzer-configuration">§</a>Rust Analyzer Configuration</h3>
|
||||
<p><a href="https://rust-analyzer.github.io/">Rust Analyzer</a> is the defacto <a href="https://langserver.org/">LSP</a> for Rust. Its default
|
||||
settings are fine for smaller projects, but not well optimised for pezkuwi-sdk.</p>
|
||||
<p>Below is a suggested configuration for VSCode or any VSCode-based editor like Cursor:</p>
|
||||
<div class="example-wrap"><pre class="language-json"><code>{
|
||||
// Use a separate target dir for Rust Analyzer. Helpful if you want to use Rust
|
||||
// Analyzer and cargo on the command line at the same time,
|
||||
// at the expense of duplicating build artifacts.
|
||||
"rust-analyzer.cargo.targetDir": "target/vscode-rust-analyzer",
|
||||
// Improve stability
|
||||
"rust-analyzer.server.extraEnv": {
|
||||
"CHALK_OVERFLOW_DEPTH": "100000000",
|
||||
"CHALK_SOLVER_MAX_SIZE": "10000000"
|
||||
},
|
||||
// Check feature-gated code
|
||||
"rust-analyzer.cargo.features": "all",
|
||||
"rust-analyzer.cargo.extraEnv": {
|
||||
// Skip building WASM, there is never need for it here
|
||||
"SKIP_WASM_BUILD": "1"
|
||||
},
|
||||
// Don't expand some problematic proc_macros
|
||||
"rust-analyzer.procMacro.ignored": {
|
||||
"async-trait": ["async_trait"],
|
||||
"napi-derive": ["napi"],
|
||||
"async-recursion": ["async_recursion"],
|
||||
"async-std": ["async_std"]
|
||||
},
|
||||
// Use nightly formatting.
|
||||
// See the pezkuwi-sdk CI job that checks formatting for the current version used in
|
||||
// pezkuwi-sdk.
|
||||
"rust-analyzer.rustfmt.extraArgs": ["+nightly-2024-04-10"],
|
||||
}</code></pre></div>
|
||||
<p>and the same in Lua for <code>neovim/nvim-lspconfig</code>:</p>
|
||||
<div class="example-wrap"><pre class="language-lua"><code>["rust-analyzer"] = {
|
||||
rust = {
|
||||
# Use a separate target dir for Rust Analyzer. Helpful if you want to use Rust
|
||||
# Analyzer and cargo on the command line at the same time.
|
||||
analyzerTargetDir = "target/nvim-rust-analyzer",
|
||||
},
|
||||
server = {
|
||||
# Improve stability
|
||||
extraEnv = {
|
||||
["CHALK_OVERFLOW_DEPTH"] = "100000000",
|
||||
["CHALK_SOLVER_MAX_SIZE"] = "100000000",
|
||||
},
|
||||
},
|
||||
cargo = {
|
||||
# Check feature-gated code
|
||||
features = "all",
|
||||
extraEnv = {
|
||||
# Skip building WASM, there is never need for it here
|
||||
["SKIP_WASM_BUILD"] = "1",
|
||||
},
|
||||
},
|
||||
procMacro = {
|
||||
# Don't expand some problematic proc_macros
|
||||
ignored = {
|
||||
["async-trait"] = { "async_trait" },
|
||||
["napi-derive"] = { "napi" },
|
||||
["async-recursion"] = { "async_recursion" },
|
||||
["async-std"] = { "async_std" },
|
||||
},
|
||||
},
|
||||
rustfmt = {
|
||||
# Use nightly formatting.
|
||||
# See the pezkuwi-sdk CI job that checks formatting for the current version used in
|
||||
# pezkuwi-sdk.
|
||||
extraArgs = { "+nightly-2024-04-10" },
|
||||
},
|
||||
},</code></pre></div>
|
||||
<p>Alternatively for neovim, if you are using <a href="https://github.com/mrcjkb/rustaceanvim">Rustaceanvim</a>,
|
||||
you can achieve the same configuring <code>rust-analyzer</code> via <code>rustaceanvim</code> as follows:</p>
|
||||
<div class="example-wrap"><pre class="language-lua"><code>return {
|
||||
{
|
||||
"mrcjkb/rustaceanvim",
|
||||
opts = {
|
||||
server = {
|
||||
default_settings = {
|
||||
["rust-analyzer"] = {
|
||||
// put the same config as for nvim-lspconfig here
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}</code></pre></div>
|
||||
<p>Similarly for Zed, you can replicate the same VSCode configuration in
|
||||
<code>~/.config/zed/settings.json</code> as follows:</p>
|
||||
<div class="example-wrap"><pre class="language-json"><code>"lsp": {
|
||||
"rust-analyzer": {
|
||||
"initialization_options": {
|
||||
// same config as for VSCode for rust, cargo, procMacros, ...
|
||||
}
|
||||
}
|
||||
},</code></pre></div>
|
||||
<p>In general, refer to your favorite editor / IDE’s documentation to properly configure
|
||||
<code>rust-analyzer</code> as language server.
|
||||
For the full set of configuration options see <a href="https://rust-analyzer.github.io/manual.html#configuration">https://rust-analyzer.github.io/manual.html#configuration</a>.</p>
|
||||
<h3 id="cargo-usage"><a class="doc-anchor" href="#cargo-usage">§</a>Cargo Usage</h3><h4 id="using---package-aka--p"><a class="doc-anchor" href="#using---package-aka--p">§</a>Using <code>--package</code> (a.k.a. <code>-p</code>)</h4>
|
||||
<p>pezkuwi-sdk is a monorepo containing many crates. When you run a cargo command without
|
||||
<code>-p</code>, you will almost certainly compile crates outside of the scope you are working.</p>
|
||||
<p>Instead, you should identify the name of the crate you are working on by checking the <code>name</code>
|
||||
field in the closest <code>Cargo.toml</code> file. Then, use <code>-p</code> with your cargo commands to only compile
|
||||
that crate.</p>
|
||||
<h4 id="skip_wasm_build1-environment-variable"><a class="doc-anchor" href="#skip_wasm_build1-environment-variable">§</a><code>SKIP_WASM_BUILD=1</code> environment variable</h4>
|
||||
<p>When cargo touches a runtime crate, by default it will also compile the WASM binary,
|
||||
approximately doubling the compilation time.</p>
|
||||
<p>The WASM binary is usually not needed, especially when running <code>check</code> or <code>test</code>. To skip the
|
||||
WASM build, set the <code>SKIP_WASM_BUILD</code> environment variable to <code>1</code>. For example:
|
||||
<code>SKIP_WASM_BUILD=1 cargo check -p pezframe-support</code>.</p>
|
||||
<h4 id="cargo-remote"><a class="doc-anchor" href="#cargo-remote">§</a>Cargo Remote</h4>
|
||||
<p>Warning: cargo remote by default doesn’t transfer hidden files to the remote machine. But hidden
|
||||
files can be useful, e.g. for sqlx usage. On the other hand using <code>--transfer-hidden</code> flag will
|
||||
transfer <code>.git</code> which is big.</p>
|
||||
<p>If you have a powerful remote server available, you may consider using
|
||||
<a href="https://github.com/sgeisler/cargo-remote">cargo-remote</a> to execute cargo commands on it,
|
||||
freeing up local resources for other tasks like <code>rust-analyzer</code>.</p>
|
||||
<p>When using <code>cargo-remote</code>, you can configure your editor to perform the the typical
|
||||
“check-on-save” remotely as well. The configuration for VSCode (or any VSCode-based editor like
|
||||
Cursor) is as follows:</p>
|
||||
<div class="example-wrap"><pre class="language-json"><code>{
|
||||
"rust-analyzer.cargo.buildScripts.overrideCommand": [
|
||||
"cargo",
|
||||
"remote",
|
||||
"--build-env",
|
||||
"SKIP_WASM_BUILD=1",
|
||||
"--",
|
||||
"check",
|
||||
"--message-format=json",
|
||||
"--all-targets",
|
||||
"--all-features",
|
||||
"--target-dir=target/rust-analyzer"
|
||||
],
|
||||
"rust-analyzer.check.overrideCommand": [
|
||||
"cargo",
|
||||
"remote",
|
||||
"--build-env",
|
||||
"SKIP_WASM_BUILD=1",
|
||||
"--",
|
||||
"check",
|
||||
"--workspace",
|
||||
"--message-format=json",
|
||||
"--all-targets",
|
||||
"--all-features",
|
||||
"--target-dir=target/rust-analyzer"
|
||||
],
|
||||
}</code></pre></div>
|
||||
<p>and the same in Lua for <code>neovim/nvim-lspconfig</code>:</p>
|
||||
<div class="example-wrap"><pre class="language-lua"><code>["rust-analyzer"] = {
|
||||
cargo = {
|
||||
buildScripts = {
|
||||
overrideCommand = {
|
||||
"cargo",
|
||||
"remote",
|
||||
"--build-env",
|
||||
"SKIP_WASM_BUILD=1",
|
||||
"--",
|
||||
"check",
|
||||
"--message-format=json",
|
||||
"--all-targets",
|
||||
"--all-features",
|
||||
"--target-dir=target/rust-analyzer"
|
||||
},
|
||||
},
|
||||
},
|
||||
check = {
|
||||
overrideCommand = {
|
||||
"cargo",
|
||||
"remote",
|
||||
"--build-env",
|
||||
"SKIP_WASM_BUILD=1",
|
||||
"--",
|
||||
"check",
|
||||
"--workspace",
|
||||
"--message-format=json",
|
||||
"--all-targets",
|
||||
"--all-features",
|
||||
"--target-dir=target/rust-analyzer"
|
||||
},
|
||||
},
|
||||
},</code></pre></div></div></details></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {};
|
||||
+205
File diff suppressed because one or more lines are too long
+192
File diff suppressed because one or more lines are too long
+192
File diff suppressed because one or more lines are too long
+1
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `call_data` mod in crate `pezkuwi_sdk_docs`."><title>pezkuwi_sdk_docs::reference_docs::extrinsic_encoding::call_data - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module call_data</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module call_<wbr>data</a></h2><h3><a href="#enums">Module Items</a></h3><ul class="block"><li><a href="#enums" title="Enums">Enums</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>extrinsic_<wbr>encoding</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">extrinsic_encoding</a></div><h1>Module <span>call_<wbr>data</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/extrinsic_encoding.rs.html#233">Source</a> </span></div><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.Call.html" title="enum pezkuwi_sdk_docs::reference_docs::extrinsic_encoding::call_data::Call">Call</a></dt><dt><a class="enum" href="enum.PalletACall.html" title="enum pezkuwi_sdk_docs::reference_docs::extrinsic_encoding::call_data::PalletACall">PalletA<wbr>Call</a></dt><dt><a class="enum" href="enum.PalletBCall.html" title="enum pezkuwi_sdk_docs::reference_docs::extrinsic_encoding::call_data::PalletBCall">PalletB<wbr>Call</a></dt></dl></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"enum":["Call","PalletACall","PalletBCall"]};
|
||||
+1
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `encode_demo_extrinsic` fn in crate `pezkuwi_sdk_docs`."><title>encode_demo_extrinsic in pezkuwi_sdk_docs::reference_docs::extrinsic_encoding::encoding_example - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">encode_demo_extrinsic</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>extrinsic_<wbr>encoding::<wbr>encoding_<wbr>example</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">extrinsic_encoding</a>::<wbr><a href="index.html">encoding_example</a></div><h1>Function <span class="fn">encode_<wbr>demo_<wbr>extrinsic</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/extrinsic_encoding.rs.html#303-333">Source</a> </span></div><pre class="rust item-decl"><code>pub fn encode_demo_extrinsic() -> <a class="struct" href="https://doc.rust-lang.org/1.91.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/1.91.1/std/primitive.u8.html">u8</a>> <a href="#" class="tooltip" data-notable-ty="Vec<u8>">ⓘ</a></code></pre><script type="text/json" id="notable-traits-data">{"Vec<u8>":"<h3>Notable traits for <code><a class=\"struct\" href=\"https://doc.rust-lang.org/1.91.1/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.91.1/std/primitive.u8.html\">u8</a>, A></code></h3><pre><code><div class=\"where\">impl<A> <a class=\"trait\" href=\"https://doc.rust-lang.org/1.91.1/std/io/trait.Write.html\" title=\"trait std::io::Write\">Write</a> for <a class=\"struct\" href=\"https://doc.rust-lang.org/1.91.1/alloc/vec/struct.Vec.html\" title=\"struct alloc::vec::Vec\">Vec</a><<a class=\"primitive\" href=\"https://doc.rust-lang.org/1.91.1/std/primitive.u8.html\">u8</a>, A><div class=\"where\">where\n A: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.91.1/core/alloc/trait.Allocator.html\" title=\"trait core::alloc::Allocator\">Allocator</a>,</div></div>"}</script></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `encoding_example` mod in crate `pezkuwi_sdk_docs`."><title>pezkuwi_sdk_docs::reference_docs::extrinsic_encoding::encoding_example - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module encoding_example</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module encoding_<wbr>example</a></h2><h3><a href="#functions">Module Items</a></h3><ul class="block"><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>extrinsic_<wbr>encoding</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">extrinsic_encoding</a></div><h1>Module <span>encoding_<wbr>example</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/extrinsic_encoding.rs.html#275">Source</a> </span></div><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.encode_demo_extrinsic.html" title="fn pezkuwi_sdk_docs::reference_docs::extrinsic_encoding::encoding_example::encode_demo_extrinsic">encode_<wbr>demo_<wbr>extrinsic</a></dt></dl></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"fn":["encode_demo_extrinsic"]};
|
||||
@@ -0,0 +1,330 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Learn about how extrinsics are encoded to be transmitted to a node and stored in blocks."><title>pezkuwi_sdk_docs::reference_docs::extrinsic_encoding - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module extrinsic_encoding</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module extrinsic_<wbr>encoding</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#constructing-and-signing-extrinsics" title="Constructing and Signing Extrinsics">Constructing and Signing Extrinsics</a></li><li><a href="#encoding-an-extrinsic" title="Encoding an Extrinsic">Encoding an Extrinsic</a><ul><li><a href="#compact_encoded_length" title="compact_encoded_length">compact_encoded_length</a></li><li><a href="#version_and_maybe_signature" title="version_and_maybe_signature">version_and_maybe_signature</a></li><li><a href="#version_and_extrinsic_type" title="version_and_extrinsic_type">version_and_extrinsic_type</a></li><li><a href="#call_data" title="call_data">call_data</a></li></ul></li><li><a href="#the-signed-payload-format" title="The Signed Payload Format">The Signed Payload Format</a></li><li><a href="#the-general-transaction-format" title="The General Transaction Format">The General Transaction Format</a></li><li><a href="#example-encoding" title="Example Encoding">Example Encoding</a></li></ul><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../index.html">reference_docs</a></div><h1>Module <span>extrinsic_<wbr>encoding</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/pezkuwi_sdk_docs/reference_docs/extrinsic_encoding.rs.html#1-334">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Learn about how extrinsics are encoded to be transmitted to a node and stored in blocks.</p>
|
||||
<h2 id="constructing-and-signing-extrinsics"><a class="doc-anchor" href="#constructing-and-signing-extrinsics">§</a>Constructing and Signing Extrinsics</h2>
|
||||
<p>Extrinsics are payloads that are stored in blocks which are responsible for altering the state
|
||||
of a blockchain via the <a href="../blockchain_state_machines/index.html" title="mod pezkuwi_sdk_docs::reference_docs::blockchain_state_machines"><em>state transition
|
||||
function</em></a>.</p>
|
||||
<p>Bizinikiwi is configurable enough that extrinsics can take any format. In practice, runtimes
|
||||
tend to use our [<code>pezsp_runtime::generic::UncheckedExtrinsic</code>] type to represent extrinsics,
|
||||
because it’s generic enough to cater for most (if not all) use cases. In Pezkuwi, this is
|
||||
configured <a href="https://github.com/pezkuwichain/pezkuwi-fellows/tree/main/runtimes/blob/94b2798b69ba6779764e20a50f056e48db78ebef/relay/pezkuwi/src/lib.rs#L1478">here</a>
|
||||
at the time of writing.</p>
|
||||
<p>What follows is a description of how extrinsics based on this
|
||||
[<code>pezsp_runtime::generic::UncheckedExtrinsic</code>] type are encoded into bytes. Specifically, we are
|
||||
looking at how extrinsics with a format version of 5 are encoded. This version is itself a part
|
||||
of the payload, and if it changes, it indicates that something about the encoding may have
|
||||
changed.</p>
|
||||
<h2 id="encoding-an-extrinsic"><a class="doc-anchor" href="#encoding-an-extrinsic">§</a>Encoding an Extrinsic</h2>
|
||||
<p>At a high level, all extrinsics compatible with [<code>pezsp_runtime::generic::UncheckedExtrinsic</code>]
|
||||
are formed from concatenating some details together, as in the following pseudo-code:</p>
|
||||
<div class="example-wrap"><pre class="language-text"><code>extrinsic_bytes = concat(
|
||||
compact_encoded_length,
|
||||
version_and_extrinsic_type,
|
||||
maybe_extension_data,
|
||||
call_data
|
||||
)</code></pre></div>
|
||||
<p>For clarity, the actual implementation in Bizinikiwi looks like this:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl</span><Address, Call, Signature, Extension> Encode
|
||||
<span class="kw">for </span>UncheckedExtrinsic<Address, Call, Signature, Extension>
|
||||
<span class="kw">where
|
||||
</span>Preamble<Address, Signature, Extension>: Encode,
|
||||
Call: Encode,
|
||||
Extension: Encode,
|
||||
{
|
||||
<span class="kw">fn </span>encode(<span class="kw-2">&</span><span class="self">self</span>) -> Vec<u8> {
|
||||
<span class="kw">let </span>tmp = <span class="self">self</span>.encode_without_prefix();
|
||||
|
||||
<span class="kw">let </span>compact_len = codec::Compact::<u32>(tmp.len() <span class="kw">as </span>u32);
|
||||
|
||||
<span class="comment">// Allocate the output buffer with the correct length
|
||||
</span><span class="kw">let </span><span class="kw-2">mut </span>output = Vec::with_capacity(compact_len.size_hint() + tmp.len());
|
||||
|
||||
compact_len.encode_to(<span class="kw-2">&mut </span>output);
|
||||
output.extend(tmp);
|
||||
|
||||
output
|
||||
}
|
||||
}</code></pre></div>
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl</span><Address, Call, Signature, Extra> Encode
|
||||
<span class="kw">for </span>UncheckedExtrinsicV4<Address, Call, Signature, Extra>
|
||||
<span class="kw">where
|
||||
</span>Address: Encode,
|
||||
Signature: Encode,
|
||||
Call: Encode,
|
||||
Extra: Encode,
|
||||
{
|
||||
<span class="kw">fn </span>encode(<span class="kw-2">&</span><span class="self">self</span>) -> Vec<u8> {
|
||||
<span class="kw">let </span><span class="kw-2">mut </span>tmp = Vec::with_capacity(core::mem::size_of::<<span class="self">Self</span>>());
|
||||
|
||||
<span class="comment">// 1 byte version id.
|
||||
</span><span class="kw">match </span><span class="self">self</span>.signature.as_ref() {
|
||||
<span class="prelude-val">Some</span>(s) => {
|
||||
tmp.push(<span class="number">4u8 </span>| <span class="number">0b1000_0000</span>);
|
||||
s.encode_to(<span class="kw-2">&mut </span>tmp);
|
||||
},
|
||||
<span class="prelude-val">None </span>=> {
|
||||
tmp.push(<span class="number">4u8 </span>& <span class="number">0b0111_1111</span>);
|
||||
},
|
||||
}
|
||||
<span class="self">self</span>.function.encode_to(<span class="kw-2">&mut </span>tmp);
|
||||
|
||||
<span class="kw">let </span>compact_len = codec::Compact::<u32>(tmp.len() <span class="kw">as </span>u32);
|
||||
|
||||
<span class="comment">// Allocate the output buffer with the correct length
|
||||
</span><span class="kw">let </span><span class="kw-2">mut </span>output = Vec::with_capacity(compact_len.size_hint() + tmp.len());
|
||||
|
||||
compact_len.encode_to(<span class="kw-2">&mut </span>output);
|
||||
output.extend(tmp);
|
||||
|
||||
output
|
||||
}
|
||||
}</code></pre></div>
|
||||
<p>Let’s look at how each of these details is constructed:</p>
|
||||
<h3 id="compact_encoded_length"><a class="doc-anchor" href="#compact_encoded_length">§</a>compact_encoded_length</h3>
|
||||
<p>This is a [SCALE compact encoded][pezframe::deps::codec::Compact] integer which is equal to the
|
||||
length, in bytes, of the rest of the extrinsic details.</p>
|
||||
<p>To obtain this value, we must encode and concatenate together the rest of the extrinsic details
|
||||
first, and then obtain the byte length of these. We can then compact encode that length, and
|
||||
prepend it to the rest of the details.</p>
|
||||
<h3 id="version_and_maybe_signature"><a class="doc-anchor" href="#version_and_maybe_signature">§</a>version_and_maybe_signature</h3>
|
||||
<p>If the extrinsic is <em>unsigned</em>, then <code>version_and_maybe_signature</code> will be just one byte
|
||||
denoting the <em>transaction protocol version</em>, which is 4 (or <code>0b0000_0100</code>).</p>
|
||||
<p>If the extrinsic is <em>signed</em> (all extrinsics submitted from users must be signed), then
|
||||
<code>version_and_maybe_signature</code> is obtained by concatenating some details together, ie:</p>
|
||||
<div class="example-wrap"><pre class="language-text"><code>version_and_maybe_signature = concat(
|
||||
version_and_signed,
|
||||
from_address,
|
||||
signature,
|
||||
transaction_extensions_extra,
|
||||
)</code></pre></div>
|
||||
<p>Each of the details to be concatenated together is explained below:</p>
|
||||
<h3 id="version_and_extrinsic_type"><a class="doc-anchor" href="#version_and_extrinsic_type">§</a>version_and_extrinsic_type</h3>
|
||||
<p>This byte has 2 components:</p>
|
||||
<ul>
|
||||
<li>the 2 most significant bits represent the extrinsic type:
|
||||
<ul>
|
||||
<li>bare - <code>0b00</code></li>
|
||||
<li>signed - <code>0b10</code></li>
|
||||
<li>general - <code>0b01</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>the 6 least significant bits represent the extrinsic format version (currently 5)</li>
|
||||
</ul>
|
||||
<h4 id="bare-extrinsics"><a class="doc-anchor" href="#bare-extrinsics">§</a>Bare extrinsics</h4>
|
||||
<p>If the extrinsic is <em>bare</em>, then <code>version_and_extrinsic_type</code> will be just the <em>transaction
|
||||
protocol version</em>, which is 5 (or <code>0b0000_0101</code>). Bare extrinsics do not carry any other
|
||||
extension data, so <code>maybe_extension_data</code> would not be included in the payload and the
|
||||
<code>version_and_extrinsic_type</code> would always be followed by the encoded call bytes.</p>
|
||||
<h4 id="signed-extrinsics"><a class="doc-anchor" href="#signed-extrinsics">§</a>Signed extrinsics</h4>
|
||||
<p>If the extrinsic is <em>signed</em> (all extrinsics submitted from users used to be signed up until
|
||||
version 4), then <code>version_and_extrinsic_type</code> is obtained by having a MSB of <code>1</code> on the
|
||||
<em>transaction protocol version</em> byte (which translates to <code>0b1000_0101</code>).</p>
|
||||
<p>Additionally, <em>signed</em> extrinsics also carry with them address and signature information encoded
|
||||
as follows:</p>
|
||||
<h5 id="from_address"><a class="doc-anchor" href="#from_address">§</a>from_address</h5>
|
||||
<p>This is the [SCALE encoded][pezframe::deps::codec] address of the sender of the extrinsic. The
|
||||
address is the first generic parameter of [<code>pezsp_runtime::generic::UncheckedExtrinsic</code>], and so
|
||||
can vary from chain to chain.</p>
|
||||
<p>The address type used on the Pezkuwi relay chain is
|
||||
[<code>pezsp_runtime::MultiAddress<AccountId32></code>], where <code>AccountId32</code> is defined
|
||||
[here][<code>pezsp_core::crypto::AccountId32</code>]. When constructing a signed extrinsic to be submitted
|
||||
to a Pezkuwi node, you’ll always use the [<code>pezsp_runtime::MultiAddress::Id</code>] variant to wrap
|
||||
your <code>AccountId32</code>.</p>
|
||||
<h5 id="signature"><a class="doc-anchor" href="#signature">§</a>signature</h5>
|
||||
<p>This is the [SCALE encoded][pezframe::deps::codec] signature. The signature type is configured via
|
||||
the third generic parameter of [<code>pezsp_runtime::generic::UncheckedExtrinsic</code>], which determines
|
||||
the shape of the signature and signing algorithm that should be used.</p>
|
||||
<p>The signature is obtained by signing the <em>signed payload</em> bytes (see below on how this is
|
||||
constructed) using the private key associated with the address and correct algorithm.</p>
|
||||
<p>The signature type used on the Pezkuwi relay chain is [<code>pezsp_runtime::MultiSignature</code>]; the
|
||||
variants there are the types of signature that can be provided.</p>
|
||||
<h4 id="general-extrinsics"><a class="doc-anchor" href="#general-extrinsics">§</a>General extrinsics</h4>
|
||||
<p>If the extrinsic is <em>general</em> (it doesn’t carry a signature in the payload, only extension
|
||||
data), then <code>version_and_extrinsic_type</code> is obtained by logical OR between the general
|
||||
transaction type bits and the <em>transaction protocol version</em> byte (which translates to
|
||||
<code>0b0100_0101</code>).</p>
|
||||
<h4 id="transaction_extensions_extra"><a class="doc-anchor" href="#transaction_extensions_extra">§</a>transaction_extensions_extra</h4>
|
||||
<p>This is the concatenation of the [SCALE encoded][pezframe::deps::codec] bytes representing first a
|
||||
single byte describing the extension version (this is bumped whenever a change occurs in the
|
||||
transaction extension pipeline) followed by the bytes of each of the [<em>transaction
|
||||
extensions</em>][pezsp_runtime::traits::TransactionExtension], and are configured by the fourth
|
||||
generic parameter of [<code>pezsp_runtime::generic::UncheckedExtrinsic</code>]. Learn more about
|
||||
transaction extensions <a href="../transaction_extensions/index.html" title="mod pezkuwi_sdk_docs::reference_docs::transaction_extensions">here</a>.</p>
|
||||
<p>When it comes to constructing an extrinsic, each transaction extension has two things that we
|
||||
are interested in here:</p>
|
||||
<ul>
|
||||
<li>The actual SCALE encoding of the transaction extension type itself; this is what will form our
|
||||
<code>transaction_extensions_extra</code> bytes.</li>
|
||||
<li>An <code>Implicit</code> type. This is SCALE encoded into the <code>transaction_extensions_implicit</code> data (see
|
||||
below).</li>
|
||||
</ul>
|
||||
<p>Either (or both) of these can encode to zero bytes.</p>
|
||||
<p>Each chain configures the set of transaction extensions that it uses in its runtime
|
||||
configuration. At the time of writing, Pezkuwi configures them
|
||||
<a href="https://github.com/pezkuwichain/pezkuwi-fellows/tree/main/runtimes/blob/1dc04eb954eadf8aadb5d83990b89662dbb5a074/relay/pezkuwi/src/lib.rs#L1432C25-L1432C25">here</a>.
|
||||
Some of the common transaction extensions are defined
|
||||
[here][pezframe::deps::pezframe_system#transaction-extensions].</p>
|
||||
<p>Information about exactly which transaction extensions are present on a chain and in what order
|
||||
is also a part of the metadata for the chain. For V15 metadata, it can be [found
|
||||
here][pezframe::deps::pezframe_support::__private::metadata::v15::ExtrinsicMetadata].</p>
|
||||
<h3 id="call_data"><a class="doc-anchor" href="#call_data">§</a>call_data</h3>
|
||||
<p>This is the main payload of the extrinsic, which is used to determine how the chain’s state is
|
||||
altered. This is defined by the second generic parameter of
|
||||
[<code>pezsp_runtime::generic::UncheckedExtrinsic</code>].</p>
|
||||
<p>A call can be anything that implements [<code>Encode</code>][pezframe::deps::codec::Encode]. In FRAME-based
|
||||
runtimes, a call is represented as an enum of enums, where the outer enum represents the FRAME
|
||||
pezpallet being called, and the inner enum represents the call being made within that pezpallet,
|
||||
and any arguments to it. Read more about the call enum
|
||||
<a href="../frame_runtime_types/index.html" title="mod pezkuwi_sdk_docs::reference_docs::frame_runtime_types">here</a>.</p>
|
||||
<p>FRAME <code>Call</code> enums are automatically generated, and end up looking something like this:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">pub mod </span>call_data {
|
||||
<span class="kw">use </span>codec::{Decode, Encode};
|
||||
<span class="kw">use </span>pezsp_runtime::{traits::Dispatchable, DispatchResultWithInfo};
|
||||
|
||||
<span class="comment">// The outer enum composes calls within
|
||||
// different pallets together. We have two
|
||||
// pallets, "PalletA" and "PalletB".
|
||||
</span><span class="attr">#[derive(Encode, Decode, Clone)]
|
||||
</span><span class="kw">pub enum </span>Call {
|
||||
<span class="attr">#[codec(index = <span class="number">0</span>)]
|
||||
</span>PalletA(PalletACall),
|
||||
<span class="attr">#[codec(index = <span class="number">7</span>)]
|
||||
</span>PalletB(PalletBCall),
|
||||
}
|
||||
|
||||
<span class="comment">// An inner enum represents the calls within
|
||||
// a specific pezpallet. "PalletA" has one call,
|
||||
// "Foo".
|
||||
</span><span class="attr">#[derive(Encode, Decode, Clone)]
|
||||
</span><span class="kw">pub enum </span>PalletACall {
|
||||
<span class="attr">#[codec(index = <span class="number">0</span>)]
|
||||
</span>Foo(String),
|
||||
}
|
||||
|
||||
<span class="attr">#[derive(Encode, Decode, Clone)]
|
||||
</span><span class="kw">pub enum </span>PalletBCall {
|
||||
<span class="attr">#[codec(index = <span class="number">0</span>)]
|
||||
</span>Bar(String),
|
||||
}
|
||||
|
||||
<span class="kw">impl </span>Dispatchable <span class="kw">for </span>Call {
|
||||
<span class="kw">type </span>RuntimeOrigin = ();
|
||||
<span class="kw">type </span>Config = ();
|
||||
<span class="kw">type </span>Info = ();
|
||||
<span class="kw">type </span>PostInfo = ();
|
||||
<span class="kw">fn </span>dispatch(<span class="self">self</span>, _origin: <span class="self">Self</span>::RuntimeOrigin) -> DispatchResultWithInfo<<span class="self">Self</span>::PostInfo> {
|
||||
<span class="prelude-val">Ok</span>(())
|
||||
}
|
||||
}
|
||||
}</code></pre></div>
|
||||
<p>In pseudo-code, this <code>Call</code> enum encodes equivalently to:</p>
|
||||
<div class="example-wrap"><pre class="language-text"><code>call_data = concat(
|
||||
pezpallet_index,
|
||||
call_index,
|
||||
call_args
|
||||
)</code></pre></div>
|
||||
<ul>
|
||||
<li><code>pezpallet_index</code> is a single byte denoting the index of the pezpallet that we are calling
|
||||
into, and is what the tag of the outermost enum will encode to.</li>
|
||||
<li><code>call_index</code> is a single byte denoting the index of the call that we are making the pezpallet,
|
||||
and is what the tag of the inner enum will encode to.</li>
|
||||
<li><code>call_args</code> are the SCALE encoded bytes for each of the arguments that the call expects, and
|
||||
are typically provided as values to the inner enum.</li>
|
||||
</ul>
|
||||
<p>Information about the pallets that exist for a chain (including their indexes), the calls
|
||||
available in each pezpallet (including their indexes), and the arguments required for each call
|
||||
can be found in the metadata for the chain. For V15 metadata, this information [is
|
||||
here][pezframe::deps::pezframe_support::__private::metadata::v15::PalletMetadata].</p>
|
||||
<h2 id="the-signed-payload-format"><a class="doc-anchor" href="#the-signed-payload-format">§</a>The Signed Payload Format</h2>
|
||||
<p>All <em>signed</em> extrinsics submitted to a node from the outside world (also known as
|
||||
<em>transactions</em>) need to be <em>signed</em>. The data that needs to be signed for some extrinsic is
|
||||
called the <em>signed payload</em>, and its shape is described by the following pseudo-code:</p>
|
||||
<div class="example-wrap"><pre class="language-text"><code>signed_payload = blake2_256(
|
||||
concat(
|
||||
call_data,
|
||||
transaction_extensions_extra,
|
||||
transaction_extensions_implicit,
|
||||
)
|
||||
)</code></pre></div>
|
||||
<p>The bytes representing <code>call_data</code> and <code>transaction_extensions_extra</code> can be obtained as
|
||||
descibed above. <code>transaction_extensions_implicit</code> is constructed by SCALE encoding the
|
||||
[“implicit” data][pezsp_runtime::traits::TransactionExtension::Implicit] for each transaction
|
||||
extension that the chain is using, in order.</p>
|
||||
<p>Once we’ve concatenated those together, we hash the result using a Blake2 256bit hasher.</p>
|
||||
<p>The [<code>pezsp_runtime::generic::SignedPayload</code>] type takes care of assembling the correct payload
|
||||
for us, given <code>call_data</code> and a tuple of transaction extensions.</p>
|
||||
<h2 id="the-general-transaction-format"><a class="doc-anchor" href="#the-general-transaction-format">§</a>The General Transaction Format</h2>
|
||||
<p>A General transaction does not have a signature method hardcoded in the check logic of the
|
||||
extrinsic, such as a traditionally signed transaction. Instead, general transactions should have
|
||||
one or more extensions in the transaction extension pipeline that auhtorize origins in some way,
|
||||
one of which could be the traditional signature check that happens for all signed transactions
|
||||
in the <a href="pezsp_runtime::traits::Checkable">Checkable</a> implementation of
|
||||
<a href="pezsp_runtime::generic::UncheckedExtrinsic">UncheckedExtrinsic</a>. Therefore, it is up to each
|
||||
extension to define the format of the payload it will try to check and authorize the right
|
||||
origin type. For an example, look into the <a href="pezpallet_example_authorization_tx_extension::extensions">authorization example pezpallet
|
||||
extensions</a></p>
|
||||
<h2 id="example-encoding"><a class="doc-anchor" href="#example-encoding">§</a>Example Encoding</h2>
|
||||
<p>Using [<code>pezsp_runtime::generic::UncheckedExtrinsic</code>], we can construct and encode an extrinsic
|
||||
as follows:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">pub mod </span>encoding_example {
|
||||
<span class="kw">use </span><span class="kw">super</span>::call_data::{Call, PalletACall};
|
||||
<span class="kw">use </span><span class="kw">crate</span>::reference_docs::transaction_extensions::transaction_extensions_example;
|
||||
<span class="kw">use </span>codec::Encode;
|
||||
<span class="kw">use </span>pezsp_core::crypto::AccountId32;
|
||||
<span class="kw">use </span>pezsp_keyring::sr25519::Keyring;
|
||||
<span class="kw">use </span>pezsp_runtime::{
|
||||
generic::{SignedPayload, UncheckedExtrinsic},
|
||||
MultiAddress, MultiSignature,
|
||||
};
|
||||
|
||||
<span class="comment">// Define some transaction extensions to use. We'll use a couple of examples
|
||||
// from the transaction extensions reference doc.
|
||||
</span><span class="kw">type </span>TransactionExtensions = (
|
||||
transaction_extensions_example::AddToPayload,
|
||||
transaction_extensions_example::AddToSignaturePayload,
|
||||
);
|
||||
|
||||
<span class="comment">// We'll use `UncheckedExtrinsic` to encode our extrinsic for us. We set
|
||||
// the address and signature type to those used on Pezkuwi, use our custom
|
||||
// `Call` type, and use our custom set of `TransactionExtensions`.
|
||||
</span><span class="kw">type </span>Extrinsic = UncheckedExtrinsic<
|
||||
MultiAddress<AccountId32, ()>,
|
||||
Call,
|
||||
MultiSignature,
|
||||
TransactionExtensions,
|
||||
>;
|
||||
|
||||
<span class="kw">pub fn </span>encode_demo_extrinsic() -> Vec<u8> {
|
||||
<span class="comment">// The "from" address will be our Alice dev account.
|
||||
</span><span class="kw">let </span>from_address = MultiAddress::<AccountId32, ()>::Id(Keyring::Alice.to_account_id());
|
||||
|
||||
<span class="comment">// We provide some values for our expected transaction extensions.
|
||||
</span><span class="kw">let </span>transaction_extensions = (
|
||||
transaction_extensions_example::AddToPayload(<span class="number">1</span>),
|
||||
transaction_extensions_example::AddToSignaturePayload,
|
||||
);
|
||||
|
||||
<span class="comment">// Construct our call data:
|
||||
</span><span class="kw">let </span>call_data = Call::PalletA(PalletACall::Foo(<span class="string">"Hello"</span>.to_string()));
|
||||
|
||||
<span class="comment">// The signed payload. This takes care of encoding the call_data,
|
||||
// transaction_extensions_extra and transaction_extensions_implicit, and hashing
|
||||
// the result if it's > 256 bytes:
|
||||
</span><span class="kw">let </span>signed_payload = SignedPayload::new(call_data.clone(), transaction_extensions.clone());
|
||||
|
||||
<span class="comment">// Sign the signed payload with our Alice dev account's private key,
|
||||
// and wrap the signature into the expected type:
|
||||
</span><span class="kw">let </span>signature = {
|
||||
<span class="kw">let </span>sig = Keyring::Alice.sign(<span class="kw-2">&</span>signed_payload.encode());
|
||||
MultiSignature::Sr25519(sig)
|
||||
};
|
||||
|
||||
<span class="comment">// Now, we can build and encode our extrinsic:
|
||||
</span><span class="kw">let </span>ext = Extrinsic::new_signed(call_data, from_address, signature, transaction_extensions);
|
||||
|
||||
<span class="kw">let </span>encoded_ext = ext.encode();
|
||||
encoded_ext
|
||||
}
|
||||
}</code></pre></div></div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="call_data/index.html" title="mod pezkuwi_sdk_docs::reference_docs::extrinsic_encoding::call_data">call_<wbr>data</a></dt><dt><a class="mod" href="encoding_example/index.html" title="mod pezkuwi_sdk_docs::reference_docs::extrinsic_encoding::encoding_example">encoding_<wbr>example</a></dt></dl></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"mod":["call_data","encoding_example"]};
|
||||
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Learn about how to make a pezpallet/runtime that is fee-less and instead uses another mechanism to control usage and sybil attacks."><title>pezkuwi_sdk_docs::reference_docs::fee_less_runtime - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module fee_less_runtime</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module fee_<wbr>less_<wbr>runtime</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#fee-less-runtime" title="Fee-Less Runtime">Fee-Less Runtime</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../index.html">reference_docs</a></div><h1>Module <span>fee_<wbr>less_<wbr>runtime</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/pezkuwi_sdk_docs/reference_docs/fee_less_runtime.rs.html#1-13">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Learn about how to make a pezpallet/runtime that is fee-less and instead uses another mechanism
|
||||
to control usage and sybil attacks.</p>
|
||||
<h2 id="fee-less-runtime"><a class="doc-anchor" href="#fee-less-runtime">§</a>Fee-Less Runtime</h2>
|
||||
<p>🚧 Work In Progress 🚧</p>
|
||||
<p>Notes:</p>
|
||||
<ul>
|
||||
<li>An extension of <a href="../runtime_vs_smart_contract/index.html" title="mod pezkuwi_sdk_docs::reference_docs::runtime_vs_smart_contract"><code>runtime_vs_smart_contract</code></a>, showcasing the tools needed to build a safe
|
||||
runtime that is fee-less.</li>
|
||||
<li>Would need to use unsigned origins, custom validate_unsigned, check the existence of some NFT
|
||||
and some kind of rate limiting (eg. any account gets 5 free tx per day).</li>
|
||||
<li>The rule of thumb is that as long as the unsigned validate does one storage read, similar to
|
||||
nonce, it is fine.</li>
|
||||
<li>This could possibly be a good guide/template, rather than a reference doc.</li>
|
||||
</ul>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {};
|
||||
@@ -0,0 +1,117 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Learn about how to do logging in FRAME-based runtimes."><title>pezkuwi_sdk_docs::reference_docs::frame_logging - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module frame_logging</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module frame_<wbr>logging</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#frame-logging" title="FRAME Logging">FRAME Logging</a><ul><li><a href="#using-println" title="Using `println!`">Using <code>println!</code></a></li><li><a href="#using-log" title="Using `log`">Using <code>log</code></a></li><li><a href="#enabling-logs-in-production" title="Enabling Logs in Production">Enabling Logs in Production</a></li><li><a href="#log-target-prefixing" title="Log Target Prefixing">Log Target Prefixing</a></li><li><a href="#low-level-primitives" title="Low Level Primitives">Low Level Primitives</a></li><li><a href="#using-logging-in-production" title="Using Logging in Production">Using Logging in Production</a></li></ul></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../index.html">reference_docs</a></div><h1>Module <span>frame_<wbr>logging</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/pezkuwi_sdk_docs/reference_docs/frame_logging.rs.html#1-155">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Learn about how to do logging in FRAME-based runtimes.</p>
|
||||
<h2 id="frame-logging"><a class="doc-anchor" href="#frame-logging">§</a>FRAME Logging</h2>
|
||||
<p>This reference docs briefly explores how to do logging and printing runtimes, mainly
|
||||
FRAME-based.</p>
|
||||
<blockquote>
|
||||
<p>Please make sure to read <a href="#using-logging-in-production">the section below</a> on using logging in
|
||||
production.</p>
|
||||
</blockquote>
|
||||
<h3 id="using-println"><a class="doc-anchor" href="#using-println">§</a>Using <code>println!</code></h3>
|
||||
<p>To recap, as with standard Rust, you can use <code>println!</code> <em>in your tests</em>, but it will only print
|
||||
out if executed with <code>--nocapture</code>, or if the test panics.</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">fn </span>it_print() {
|
||||
<span class="macro">println!</span>(<span class="string">"Hello, world!"</span>);
|
||||
}</code></pre></div>
|
||||
<p>within the pezpallet, if you want to use the standard <code>println!</code>, it needs to be wrapped in
|
||||
[<code>pezsp_std::if_std</code>]. Of course, this means that this print code is only available to you in
|
||||
the <code>std</code> compiler flag, and never present in a wasm build.</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// somewhere in your pezpallet. This is not a real pezpallet code.
|
||||
</span><span class="kw">mod </span>pezpallet {
|
||||
<span class="kw">struct </span>Pezpallet;
|
||||
<span class="kw">impl </span>Pezpallet {
|
||||
<span class="kw">fn </span>print() {
|
||||
<span class="macro">pezsp_std::if_std!</span> {
|
||||
<span class="macro">println!</span>(<span class="string">"Hello, world!"</span>);
|
||||
}
|
||||
}
|
||||
}
|
||||
}</code></pre></div><h3 id="using-log"><a class="doc-anchor" href="#using-log">§</a>Using <code>log</code></h3>
|
||||
<p>First, ensure you are familiar with the <a href="https://docs.rs/log/0.4.29/log/index.html" title="mod log"><code>log</code></a> crate. In short, each log statement has:</p>
|
||||
<ol>
|
||||
<li><code>log-level</code>, signifying how important it is.</li>
|
||||
<li><code>log-target</code>, signifying to which component it belongs.</li>
|
||||
</ol>
|
||||
<p>Add log statements to your pezpallet as such:</p>
|
||||
<p>You can add the log crate to the <code>Cargo.toml</code> of the pezpallet.</p>
|
||||
<div class="example-wrap"><pre class="language-text"><code>#[dependencies]
|
||||
log = { version = "x.y.z", default-features = false }
|
||||
|
||||
#[features]
|
||||
std = [
|
||||
// snip -- other pallets
|
||||
"log/std"
|
||||
]</code></pre></div>
|
||||
<p>More conveniently, the <code>frame</code> umbrella crate re-exports the log crate as <a href="https://docs.rs/log/0.4.29/log/index.html" title="mod log"><code>pezframe::log</code></a>.</p>
|
||||
<p>Then, the pezpallet can use this crate to emit log statements. In this statement, we use the
|
||||
info level, and the target is <code>pezpallet-example</code>.</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">mod </span>pezpallet {
|
||||
<span class="kw">struct </span>Pezpallet;
|
||||
|
||||
<span class="kw">impl </span>Pezpallet {
|
||||
<span class="kw">fn </span>logs() {
|
||||
<span class="macro">pezframe::log::info!</span>(target: <span class="string">"pezpallet-example"</span>, <span class="string">"Hello, world!"</span>);
|
||||
}
|
||||
}
|
||||
}</code></pre></div>
|
||||
<p>This will in itself just emit the log messages, <strong>but unless if captured by a logger, they will
|
||||
not go anywhere</strong>. [<code>pezsp_api</code>] provides a handy function to enable the runtime logging:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="comment">// in your test
|
||||
</span><span class="kw">fn </span>it_also_prints() {
|
||||
pezsp_api::init_runtime_logger();
|
||||
<span class="comment">// call into your pezpallet, and now it will print `log` statements.
|
||||
</span>}</code></pre></div>
|
||||
<p>Alternatively, you can use [<code>pezsp_tracing::try_init_simple</code>].</p>
|
||||
<p><code>info</code>, <code>error</code> and <code>warn</code> logs are printed by default, but if you want lower level logs to also
|
||||
be printed, you must to add the following compiler flag:</p>
|
||||
<div class="example-wrap"><pre class="language-text"><code>RUST_LOG=pezpallet-example=trace cargo test</code></pre></div><h3 id="enabling-logs-in-production"><a class="doc-anchor" href="#enabling-logs-in-production">§</a>Enabling Logs in Production</h3>
|
||||
<p>All logs from the runtime are emitted by default, but there is a feature flag in [<code>pezsp_api</code>],
|
||||
called <code>disable-logging</code>, that can be used to disable all logs in the runtime. This is useful
|
||||
for production chains to reduce the size and overhead of the wasm runtime.</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">pub fn </span>init_runtime_logger() {
|
||||
<span class="attr">#[cfg(not(feature = <span class="string">"disable-logging"</span>))]
|
||||
</span>pezsp_runtime::runtime_logger::RuntimeLogger::init();
|
||||
}</code></pre></div>
|
||||
<p>Similar to the above, the proper <code>RUST_LOG</code> must also be passed to your compiler flag when
|
||||
compiling the runtime.</p>
|
||||
<h3 id="log-target-prefixing"><a class="doc-anchor" href="#log-target-prefixing">§</a>Log Target Prefixing</h3>
|
||||
<p>Many <a href="../../pezkuwi_sdk/frame_runtime/index.html" title="mod pezkuwi_sdk_docs::pezkuwi_sdk::frame_runtime"><code>crate::pezkuwi_sdk::frame_runtime</code></a> pallets emit logs with log target <code>runtime::<name of pezpallet></code>, for example <code>runtime::system</code>. This then allows one to run a node with a wasm blob
|
||||
compiled with <code>LOG_TARGET=runtime=debug</code>, which enables the log target of all pallets who’s log
|
||||
target starts with <code>runtime</code>.</p>
|
||||
<h3 id="low-level-primitives"><a class="doc-anchor" href="#low-level-primitives">§</a>Low Level Primitives</h3>
|
||||
<p>Under the hood, logging is another instance of host functions under the hood (as defined in
|
||||
<a href="../wasm_meta_protocol/index.html" title="mod pezkuwi_sdk_docs::reference_docs::wasm_meta_protocol"><code>crate::reference_docs::wasm_meta_protocol</code></a>). The runtime uses a set of host functions under
|
||||
[<code>pezsp_io::logging</code>] and [<code>pezsp_io::misc</code>] to emit all logs and prints. You typically do not
|
||||
need to use these APIs directly.</p>
|
||||
<h3 id="using-logging-in-production"><a class="doc-anchor" href="#using-logging-in-production">§</a>Using Logging in Production</h3>
|
||||
<p>Note that within FRAME, reading storage values <strong>only for the purpose of logging</strong> is dangerous,
|
||||
and can lead to consensus issues. This is because with the introduction of
|
||||
<a href="../../guides/enable_pov_reclaim/index.html" title="mod pezkuwi_sdk_docs::guides::enable_pov_reclaim"><code>crate::guides::enable_pov_reclaim</code></a>, the node side code will track the storage changes, and
|
||||
tries to update the onchain record of the <code>proof_size</code> weight used (stored in
|
||||
[<code>pezframe_system::BlockWeight</code>]) after the block is executed.</p>
|
||||
<p>If one node has a different log level enabled than the rest of the network, and the extra logs
|
||||
impose additional storage reads, then the amount of <code>proof_size</code> weight reclaimed into
|
||||
[<code>pezframe_system::BlockWeight</code>] will be different, causing a state root mismatch, which is
|
||||
typically a fatal error emitted from [<code>pezframe_executive</code>].</p>
|
||||
<p>This also can also happen in a teyrchain context, and cause discrepancies between the relay
|
||||
chain and the teyrchain, when execution the Teyrchain Validation Function (PVF) on the relay
|
||||
chain.</p>
|
||||
<p><strong>In summary, you should only used storage values in logging (especially for levels lower than
|
||||
<code>info</code> which is typically enabled by all parties) that are already read from storage, and will
|
||||
be part of the storage proof of execution in any case</strong>.</p>
|
||||
<p>A typical faulty code would look like this:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="doccomment">/// This function will have a different storage footprint depending on the log level
|
||||
</span><span class="kw">fn </span>faulty_logging() {
|
||||
<span class="macro">log::debug!</span>(
|
||||
<span class="string">"what I am about to print is only read when `RUST_LOG=debug` {:?}"</span>,
|
||||
StorageValue::<T>::get()
|
||||
);
|
||||
}</code></pre></div>
|
||||
<p>Please read <a href="https://github.com/pezkuwichain/pezkuwi-sdk/issues/298">this issue</a> for one
|
||||
instance of the consensus issues caused by this mistake.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {};
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Learn about the offchain workers, how they function, and how to use them, as provided by the `crate::pezkuwi_sdk::frame_runtime` APIs."><title>pezkuwi_sdk_docs::reference_docs::frame_offchain_workers - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module frame_offchain_workers</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module frame_<wbr>offchain_<wbr>workers</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#offchain-workers" title="Offchain Workers">Offchain Workers</a><ul><li><a href="#context" title="Context">Context</a></li><li><a href="#nondeterministic-execution" title="Nondeterministic Execution">Nondeterministic Execution</a></li><li><a href="#frames-api" title="FRAME’s API">FRAME’s API</a></li><li><a href="#think-twice-why-use-bizinikiwis-offchain-workers" title="Think Twice: Why Use Bizinikiwi’s Offchain Workers?">Think Twice: Why Use Bizinikiwi’s Offchain Workers?</a></li><li><a href="#further-references" title="Further References">Further References</a></li></ul></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../index.html">reference_docs</a></div><h1>Module <span>frame_<wbr>offchain_<wbr>workers</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/pezkuwi_sdk_docs/reference_docs/frame_offchain_workers.rs.html#1-116">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Learn about the offchain workers, how they function, and how to use them, as provided by the
|
||||
<a href="../../pezkuwi_sdk/frame_runtime/index.html" title="mod pezkuwi_sdk_docs::pezkuwi_sdk::frame_runtime"><code>crate::pezkuwi_sdk::frame_runtime</code></a> APIs.</p>
|
||||
<h2 id="offchain-workers"><a class="doc-anchor" href="#offchain-workers">§</a>Offchain Workers</h2>
|
||||
<p>This reference document explains how offchain workers work in Bizinikiwi and FRAME. The main
|
||||
focus is upon FRAME’s implementation of this functionality. Nonetheless, offchain workers are a
|
||||
Bizinikiwi-provided feature and can be used with possible alternatives to <a href="../../pezkuwi_sdk/frame_runtime/index.html" title="mod pezkuwi_sdk_docs::pezkuwi_sdk::frame_runtime"><code>frame</code></a> as well.</p>
|
||||
<p>Offchain workers are a commonly misunderstood topic, therefore we explain them bottom-up,
|
||||
starting at the fundamentals and then describing the developer interface.</p>
|
||||
<h3 id="context"><a class="doc-anchor" href="#context">§</a>Context</h3>
|
||||
<p>Recall from <a href="../wasm_meta_protocol/index.html" title="mod pezkuwi_sdk_docs::reference_docs::wasm_meta_protocol"><code>crate::reference_docs::wasm_meta_protocol</code></a> that the node and the runtime
|
||||
communicate with one another via host functions and runtime APIs. Many of these interactions
|
||||
contribute to the actual state transition of the blockchain. For example [<code>pezsp_api::Core</code>] is
|
||||
the main runtime API that is called to execute new blocks.</p>
|
||||
<p>Offchain workers are in principle not different in any way: It is a runtime API exposed by the
|
||||
wasm blob ([<code>pezsp_offchain::OffchainWorkerApi</code>]), and the node software calls into it when it
|
||||
deems fit. But, crucially, this API call is different in that:</p>
|
||||
<ol>
|
||||
<li>It can have no impact on the state ie. it is <em>OFF (the) CHAIN</em>. If any state is altered
|
||||
during the execution of this API call, it is discarded.</li>
|
||||
<li>It has access to an extended set of host functions that allow the wasm blob to do more. For
|
||||
example, call into HTTP requests.</li>
|
||||
</ol>
|
||||
<blockquote>
|
||||
<p>The main way through which an offchain worker can interact with the state is by submitting an
|
||||
extrinsic to the chain. This is the ONLY way to alter the state from an offchain worker.
|
||||
[<code>pezpallet_example_offchain_worker</code>] provides an example of this.</p>
|
||||
</blockquote>
|
||||
<p>Given the “Off Chain” nature of this API, it is important to remember that calling this API is
|
||||
entirely optional. Some nodes might call into it, some might not, and it would have no impact on
|
||||
the execution of your blockchain because no state is altered no matter the execution of the
|
||||
offchain worker API.</p>
|
||||
<p>Bizinikiwi’s CLI allows some degree of configuration about this, allowing node operators to
|
||||
specify when they want to run the offchain worker API. See
|
||||
[<code>pezsc_cli::RunCmd::offchain_worker_params</code>].</p>
|
||||
<h3 id="nondeterministic-execution"><a class="doc-anchor" href="#nondeterministic-execution">§</a>Nondeterministic Execution</h3>
|
||||
<p>Needless to say, given the above description, the code in your offchain worker API can be
|
||||
nondeterministic, as it is not part of the blockchain’s STF, so it can be executed at unknown
|
||||
times, by unknown nodes, and has no impact on the state. This is why an HTTP
|
||||
([<code>pezsp_runtime::offchain::http</code>]) API is readily provided to the offchain worker APIs. Because
|
||||
there is no need for determinism in this context.</p>
|
||||
<blockquote>
|
||||
<p>A common mistake here is for novice developers to see this HTTP API, and imagine that
|
||||
<code>pezkuwi-sdk</code> somehow magically solved the determinism in blockchains, and now a blockchain
|
||||
can make HTTP calls and it will all work. This is absolutely NOT the case. An HTTP call made
|
||||
by the offchain worker is non-deterministic by design. Blockchains can’t and always won’t be
|
||||
able to perform non-deterministic operations such as making HTTP calls to a foreign server.</p>
|
||||
</blockquote>
|
||||
<h3 id="frames-api"><a class="doc-anchor" href="#frames-api">§</a>FRAME’s API</h3>
|
||||
<p><a href="../../pezkuwi_sdk/frame_runtime/index.html" title="mod pezkuwi_sdk_docs::pezkuwi_sdk::frame_runtime"><code>frame</code></a> provides a simple API through which pallets can define offchain worker functions. This
|
||||
is part of [<code>pezframe::traits::Hooks</code>], which is implemented as a part of
|
||||
[<code>pezframe::pezpallet_macros::hooks</code>].</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#[pezframe::pezpallet]
|
||||
</span><span class="kw">pub mod </span>pezpallet {
|
||||
<span class="kw">use </span>pezframe::prelude::<span class="kw-2">*</span>;
|
||||
|
||||
<span class="attr">#[pezpallet::config]
|
||||
</span><span class="kw">pub trait </span>Config: pezframe_system::Config {}
|
||||
|
||||
<span class="attr">#[pezpallet::pezpallet]
|
||||
</span><span class="kw">pub struct </span>Pezpallet<T>(<span class="kw">_</span>);
|
||||
|
||||
<span class="attr">#[pezpallet::hooks]
|
||||
</span><span class="kw">impl</span><T: Config> Hooks<BlockNumberFor<T>> <span class="kw">for </span>Pezpallet<T> {
|
||||
<span class="kw">fn </span>offchain_worker(block_number: BlockNumberFor<T>) {
|
||||
<span class="comment">// ...
|
||||
</span>}
|
||||
}
|
||||
}</code></pre></div>
|
||||
<p>Additionally, [<code>pezsp_runtime::offchain</code>] provides a set of utilities that can be used to
|
||||
moderate the execution of offchain workers.</p>
|
||||
<h3 id="think-twice-why-use-bizinikiwis-offchain-workers"><a class="doc-anchor" href="#think-twice-why-use-bizinikiwis-offchain-workers">§</a>Think Twice: Why Use Bizinikiwi’s Offchain Workers?</h3>
|
||||
<p>Consider the fact that in principle, an offchain worker code written using the above API is no
|
||||
different than an equivalent written with an <em>actual offchain interaction library</em>, such as
|
||||
<a href="https://pezkuwi.js.org/docs/">Pezkuwi-JS</a>, or any of the other ones listed <a href="https://github.com/substrate-developer-hub/awesome-substrate?tab=readme-ov-file#client-libraries">here</a>.</p>
|
||||
<p>They can both read from the state, and have no means of updating the state, other than the route
|
||||
of submitting an extrinsic to the chain. Therefore, it is worth thinking twice before embedding
|
||||
a logic as a part of Bizinikiwi’s offchain worker API. Does it have to be there? Can it not be a
|
||||
simple, actual offchain application that lives outside of the chain’s WASM blob?</p>
|
||||
<p>Some of the reasons why you might want to do the opposite, and actually embed an offchain worker
|
||||
API into the WASM blob are:</p>
|
||||
<ul>
|
||||
<li>Accessing the state is easier within the <code>offchain_worker</code> function, as it is already a part
|
||||
of the runtime, and [<code>pezframe::pezpallet_macros::storage</code>] provides all the tools needed to read
|
||||
the state. Other client libraries might provide varying degrees of capability here.</li>
|
||||
<li>It will be updated in synchrony with the runtime. A Bizinikiwi’s offchain application is part
|
||||
of the same WASM blob, and is therefore guaranteed to be up to date.</li>
|
||||
</ul>
|
||||
<p>For example, imagine you have modified a storage item to have a new type. This will possibly
|
||||
require a <a href="../frame_runtime_upgrades_and_migrations/index.html" title="mod pezkuwi_sdk_docs::reference_docs::frame_runtime_upgrades_and_migrations"><code>crate::reference_docs::frame_runtime_upgrades_and_migrations</code></a>, and any offchain
|
||||
code, such as a Pezkuwi-JS application, will have to be updated to reflect this change. Whereas
|
||||
the WASM offchain worker code is guaranteed to already be updated, or else the runtime code will
|
||||
not even compile.</p>
|
||||
<h3 id="further-references"><a class="doc-anchor" href="#further-references">§</a>Further References</h3>
|
||||
<ul>
|
||||
<li><a href="https://forum.network.pezkuwichain.io/t/offchain-workers-design-assumptions-vulnerabilities/2548">https://forum.network.pezkuwichain.io/t/offchain-workers-design-assumptions-vulnerabilities/2548</a></li>
|
||||
<li><a href="https://exchange.pezkuwichain.app/questions/11058/how-can-i-create-ocw-that-wont-activates-every-block-but-will-activates-only-w/11060#11060">https://exchange.pezkuwichain.app/questions/11058/how-can-i-create-ocw-that-wont-activates-every-block-but-will-activates-only-w/11060#11060</a></li>
|
||||
<li><a href="https://github.com/pezkuwichain/pezkuwi-sdk/tree/main/bizinikiwi/pezframe/examples/offchain-worker">Offchain worker example</a></li>
|
||||
</ul>
|
||||
</div></details></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {};
|
||||
@@ -0,0 +1,172 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Learn about Origins, a topic in FRAME that enables complex account abstractions to be built."><title>pezkuwi_sdk_docs::reference_docs::frame_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module frame_origin</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module frame_<wbr>origin</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#frame-origin" title="FRAME Origin">FRAME Origin</a><ul><li><a href="#context" title="Context">Context</a></li><li><a href="#adding-custom-pezpallet-origin-to-the-runtime" title="Adding Custom Pezpallet Origin to the Runtime">Adding Custom Pezpallet Origin to the Runtime</a></li><li><a href="#asserting-on-a-custom-internal-origin" title="Asserting on a Custom Internal Origin">Asserting on a Custom Internal Origin</a></li><li><a href="#asserting-on-a-custom-external-origin" title="Asserting on a Custom External Origin">Asserting on a Custom External Origin</a></li><li><a href="#obtaining-abstract-origins" title="Obtaining Abstract Origins">Obtaining Abstract Origins</a></li><li><a href="#further-references" title="Further References">Further References</a></li></ul></li></ul><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../index.html">reference_docs</a></div><h1>Module <span>frame_<wbr>origin</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#1-271">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Learn about <em>Origins</em>, a topic in FRAME that enables complex account abstractions to be built.</p>
|
||||
<h2 id="frame-origin"><a class="doc-anchor" href="#frame-origin">§</a>FRAME Origin</h2>
|
||||
<p>Let’s start by clarifying a common wrong assumption about Origin:</p>
|
||||
<p><strong>ORIGIN IS NOT AN ACCOUNT ID</strong>.</p>
|
||||
<p>FRAME’s origin abstractions allow you to convey meanings far beyond just an account-id being the
|
||||
caller of an extrinsic. Nonetheless, an account-id having signed an extrinsic is one of the
|
||||
meanings that an origin can convey. This is the commonly used
|
||||
[<code>pezframe_system::ensure_signed</code>], where the return value happens to be an account-id.</p>
|
||||
<p>Instead, let’s establish the following as the correct definition of an origin:</p>
|
||||
<blockquote>
|
||||
<p>The origin type represents the privilege level of the caller of an extrinsic.</p>
|
||||
</blockquote>
|
||||
<p>That is, an extrinsic, through checking the origin, can <em>express what privilege level it wishes
|
||||
to impose on the caller of the extrinsic</em>. One of those checks can be as simple as “<em>any account
|
||||
that has signed a statement can pass</em>”.</p>
|
||||
<p>But the origin system can also express more abstract and complicated privilege levels. For
|
||||
example:</p>
|
||||
<ul>
|
||||
<li>If the majority of token holders agreed upon this. This is more or less what the
|
||||
[<code>pezpallet_democracy</code>] does under the hood (<a href="https://github.com/pezkuwichain/pezkuwi-sdk/blob/edd95b3749754d2ed0c5738588e872c87be91624/bizinikiwi/pezframe/democracy/src/lib.rs#L1603-L1633">reference</a>).</li>
|
||||
<li>If a specific ratio of an instance of [<code>pezpallet_collective</code>]/DAO agrees upon this.</li>
|
||||
<li>If another consensus system, for example a bridged network or a teyrchain, agrees upon this.</li>
|
||||
<li>If the majority of validator/authority set agrees upon this<sup id="fnref1"><a href="#fn1">1</a></sup>.</li>
|
||||
<li>If caller holds a particular NFT.</li>
|
||||
</ul>
|
||||
<p>and many more.</p>
|
||||
<h3 id="context"><a class="doc-anchor" href="#context">§</a>Context</h3>
|
||||
<p>First, let’s look at where the <code>origin</code> type is encountered in a typical pezpallet. The <code>origin: OriginFor<T></code> has to be the first argument of any given callable extrinsic in FRAME:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="attr">#[pezpallet::call]
|
||||
</span><span class="kw">impl</span><T: Config> Pezpallet<T> {
|
||||
<span class="kw">pub fn </span>do_something(_origin: OriginFor<T>) -> DispatchResult {
|
||||
<span class="comment">// ^^^^^^^^^^^^^^^^^^^^^
|
||||
</span><span class="macro">todo!</span>();
|
||||
}
|
||||
}</code></pre></div>
|
||||
<p>Typically, the code of an extrinsic starts with an origin check, such as
|
||||
[<code>pezframe_system::ensure_signed</code>].</p>
|
||||
<p>Note that <a href="pezframe_system::pezpallet_prelude::OriginFor"><code>OriginFor</code></a> is merely a shorthand for
|
||||
[<code>pezframe_system::Config::RuntimeOrigin</code>]. Given the name prefix <code>Runtime</code>, we can learn that
|
||||
<code>RuntimeOrigin</code> is similar to <code>RuntimeCall</code> and others, a runtime composite enum that is
|
||||
amalgamated at the runtime level. Read <a href="../frame_runtime_types/index.html" title="mod pezkuwi_sdk_docs::reference_docs::frame_runtime_types"><code>crate::reference_docs::frame_runtime_types</code></a> to
|
||||
familiarize yourself with these types.</p>
|
||||
<p>To understand this better, we will next create a pezpallet with a custom origin, which will add
|
||||
a new variant to <code>RuntimeOrigin</code>.</p>
|
||||
<h3 id="adding-custom-pezpallet-origin-to-the-runtime"><a class="doc-anchor" href="#adding-custom-pezpallet-origin-to-the-runtime">§</a>Adding Custom Pezpallet Origin to the Runtime</h3>
|
||||
<p>For example, given a pezpallet that defines the following custom origin:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="attr">#[pezpallet::origin]
|
||||
#[derive(
|
||||
PartialEq,
|
||||
Eq,
|
||||
Clone,
|
||||
RuntimeDebug,
|
||||
Encode,
|
||||
Decode,
|
||||
DecodeWithMemTracking,
|
||||
TypeInfo,
|
||||
MaxEncodedLen,
|
||||
)]
|
||||
</span><span class="kw">pub enum </span>Origin {
|
||||
<span class="doccomment">/// If all holders of a particular NFT have agreed upon this.
|
||||
</span>AllNftHolders,
|
||||
<span class="doccomment">/// If all validators have agreed upon this.
|
||||
</span>ValidatorSet,
|
||||
}</code></pre></div>
|
||||
<p>And a runtime with the following pallets:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="macro">construct_runtime!</span>(
|
||||
<span class="kw">pub struct </span>Runtime {
|
||||
System: pezframe_system,
|
||||
PalletWithCustomOrigin: pezpallet_with_custom_origin,
|
||||
}
|
||||
);</code></pre></div>
|
||||
<p>The type <a href="runtime_for_origin/struct.RuntimeOrigin.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::RuntimeOrigin"><code>crate::reference_docs::frame_origin::runtime_for_origin::RuntimeOrigin</code></a> is expanded.
|
||||
This <code>RuntimeOrigin</code> contains a variant for the [<code>pezframe_system::RawOrigin</code>] and the custom
|
||||
origin of the pezpallet.</p>
|
||||
<blockquote>
|
||||
<p>Notice how the [<code>pezframe_system::ensure_signed</code>] is nothing more than a <code>match</code> statement. If
|
||||
you want to know where the actual origin of an extrinsic is set (and the signature
|
||||
verification happens, if any), see
|
||||
[<code>pezsp_runtime::generic::CheckedExtrinsic#trait-implementations</code>], specifically
|
||||
[<code>pezsp_runtime::traits::Applyable</code>]’s implementation.</p>
|
||||
</blockquote>
|
||||
<h3 id="asserting-on-a-custom-internal-origin"><a class="doc-anchor" href="#asserting-on-a-custom-internal-origin">§</a>Asserting on a Custom Internal Origin</h3>
|
||||
<p>In order to assert on a custom origin that is defined within your pezpallet, we need a way to
|
||||
first convert the <code><T as pezframe_system::Config>::RuntimeOrigin</code> into the local <code>enum Origin</code>
|
||||
of the current pezpallet. This is a common process that is explained in
|
||||
<a href="../frame_runtime_types/index.html#%20adding-further-constraints-to-runtime-composite-enums" title="mod pezkuwi_sdk_docs::reference_docs::frame_runtime_types"><code>crate::reference_docs::frame_runtime_types</code></a>.</p>
|
||||
<p>We use the same process here to express that <code>RuntimeOrigin</code> has a number of additional bounds,
|
||||
as follows.</p>
|
||||
<ol>
|
||||
<li>Defining a custom <code>RuntimeOrigin</code> with further bounds in the pezpallet.</li>
|
||||
</ol>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="attr">#[pezpallet::config]
|
||||
</span><span class="kw">pub trait </span>Config: pezframe_system::Config {
|
||||
<span class="kw">type </span>RuntimeOrigin: From<<<span class="self">Self </span><span class="kw">as </span>pezframe_system::Config>::RuntimeOrigin>
|
||||
+ Into<<span class="prelude-ty">Result</span><Origin, <<span class="self">Self </span><span class="kw">as </span>Config>::RuntimeOrigin>>;
|
||||
}</code></pre></div>
|
||||
<ol start="2">
|
||||
<li>Using it in the pezpallet.</li>
|
||||
</ol>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="attr">#[pezpallet::call]
|
||||
</span><span class="kw">impl</span><T: Config> Pezpallet<T> {
|
||||
<span class="kw">pub fn </span>only_validators(origin: OriginFor<T>) -> DispatchResult {
|
||||
<span class="comment">// first, we convert from `<T as pezframe_system::Config>::RuntimeOrigin` to `<T as
|
||||
// Config>::RuntimeOrigin`
|
||||
</span><span class="kw">let </span>local_runtime_origin = <<T <span class="kw">as </span>Config>::RuntimeOrigin <span class="kw">as </span>From<
|
||||
<T <span class="kw">as </span>pezframe_system::Config>::RuntimeOrigin,
|
||||
>>::from(origin);
|
||||
<span class="comment">// then we convert to `origin`, if possible
|
||||
</span><span class="kw">let </span>local_origin =
|
||||
local_runtime_origin.into().map_err(|<span class="kw">_</span>| <span class="string">"invalid origin type provided"</span>)<span class="question-mark">?</span>;
|
||||
<span class="macro">ensure!</span>(<span class="macro">matches!</span>(local_origin, Origin::ValidatorSet), <span class="string">"Not authorized"</span>);
|
||||
<span class="macro">todo!</span>();
|
||||
}
|
||||
}</code></pre></div><h3 id="asserting-on-a-custom-external-origin"><a class="doc-anchor" href="#asserting-on-a-custom-external-origin">§</a>Asserting on a Custom External Origin</h3>
|
||||
<p>Very often, a pezpallet wants to have a parameterized origin that is <strong>NOT</strong> defined within the
|
||||
pezpallet. In other words, a pezpallet wants to delegate an origin check to something that is
|
||||
specified later at the runtime level. Like many other parameterizations in FRAME, this implies
|
||||
adding a new associated type to <code>trait Config</code>.</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="attr">#[pezpallet::config]
|
||||
</span><span class="kw">pub trait </span>Config: pezframe_system::Config {
|
||||
<span class="kw">type </span>ExternalOrigin: EnsureOrigin<<span class="self">Self</span>::RuntimeOrigin>;
|
||||
}</code></pre></div>
|
||||
<p>Then, within the pezpallet, we can simply use this “unknown” origin check type:</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="attr">#[pezpallet::call]
|
||||
</span><span class="kw">impl</span><T: Config> Pezpallet<T> {
|
||||
<span class="kw">pub fn </span>externally_checked_ext(origin: OriginFor<T>) -> DispatchResult {
|
||||
T::ExternalOrigin::ensure_origin(origin)<span class="question-mark">?</span>;
|
||||
<span class="macro">todo!</span>();
|
||||
}
|
||||
}</code></pre></div>
|
||||
<p>Finally, at the runtime, any implementation of [<code>pezframe::traits::EnsureOrigin</code>] can be passed.</p>
|
||||
|
||||
<div class="example-wrap ignore"><a href="#" class="tooltip" title="This example is not tested">ⓘ</a><pre class="rust rust-example-rendered"><code><span class="kw">impl </span>pezpallet_with_external_origin::Config <span class="kw">for </span>Runtime {
|
||||
<span class="kw">type </span>ExternalOrigin = EnsureSigned<<<span class="self">Self </span><span class="kw">as </span>pezframe_system::Config>::AccountId>;
|
||||
}</code></pre></div>
|
||||
<p>Indeed, some of these implementations of [<code>pezframe::traits::EnsureOrigin</code>] are similar to the ones
|
||||
that we know about: [<code>pezframe::runtime::prelude::EnsureSigned</code>],
|
||||
[<code>pezframe::runtime::prelude::EnsureSignedBy</code>], [<code>pezframe::runtime::prelude::EnsureRoot</code>],
|
||||
[<code>pezframe::runtime::prelude::EnsureNone</code>], etc. But, there are also many more that are not known
|
||||
to us, and are defined in other pallets.</p>
|
||||
<p>For example, [<code>pezpallet_collective</code>] defines [<code>pezpallet_collective::EnsureMember</code>] and
|
||||
[<code>pezpallet_collective::EnsureProportionMoreThan</code>] and many more, which is exactly what we
|
||||
alluded to earlier in this document.</p>
|
||||
<p>Make sure to check the full list of <a href="pezframe::traits::EnsureOrigin#implementors">implementors of
|
||||
<code>EnsureOrigin</code></a> for more inspiration.</p>
|
||||
<h3 id="obtaining-abstract-origins"><a class="doc-anchor" href="#obtaining-abstract-origins">§</a>Obtaining Abstract Origins</h3>
|
||||
<p>So far we have learned that FRAME pallets can assert on custom and abstract origin types,
|
||||
whether they are defined within the pezpallet or not. But how can we obtain these abstract
|
||||
origins?</p>
|
||||
<blockquote>
|
||||
<p>All extrinsics that come from the outer world can generally only be obtained as either
|
||||
<code>signed</code> or <code>none</code> origin.</p>
|
||||
</blockquote>
|
||||
<p>Generally, these abstract origins are only obtained within the runtime, when a call is
|
||||
dispatched within the runtime.</p>
|
||||
<h3 id="further-references"><a class="doc-anchor" href="#further-references">§</a>Further References</h3>
|
||||
<ul>
|
||||
<li><a href="https://youtu.be/j7b8Upipmeg?si=83_XUgYuJxMwWX4g&t=195">Gavin Wood’s speech about FRAME features at Protocol Berg 2023.</a></li>
|
||||
<li><a href="https://exchange.pezkuwichain.app/questions/10992/how-do-you-find-the-public-key-for-the-medium-spender-track-origin">A related StackExchange question.</a></li>
|
||||
</ul>
|
||||
<div class="footnotes"><hr><ol><li id="fn1"><p>Inherents are essentially unsigned extrinsics that need an [<code>pezframe_system::ensure_none</code>]
|
||||
origin check, and through the virtue of being an inherent, are agreed upon by all validators. <a href="#fnref1">↩</a></p></li></ol></div></div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="pezpallet_for_origin/index.html" title="mod pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin">pezpallet_<wbr>for_<wbr>origin</a></dt><dd>The <code>pezpallet</code> module in each FRAME pezpallet hosts the most important items needed
|
||||
to construct this pezpallet.</dd><dt><a class="mod" href="pezpallet_with_custom_origin/index.html" title="mod pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin">pezpallet_<wbr>with_<wbr>custom_<wbr>origin</a></dt><dd>The <code>pezpallet</code> module in each FRAME pezpallet hosts the most important items needed
|
||||
to construct this pezpallet.</dd><dt><a class="mod" href="pezpallet_with_external_origin/index.html" title="mod pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin">pezpallet_<wbr>with_<wbr>external_<wbr>origin</a></dt><dd>The <code>pezpallet</code> module in each FRAME pezpallet hosts the most important items needed
|
||||
to construct this pezpallet.</dd><dt><a class="mod" href="runtime_for_external_origin/index.html" title="mod pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin">runtime_<wbr>for_<wbr>external_<wbr>origin</a></dt><dt><a class="mod" href="runtime_for_origin/index.html" title="mod pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin">runtime_<wbr>for_<wbr>origin</a></dt></dl></section></div></main></body></html>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Warning: Doc-Only"><title>do_something in pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin::dispatchables - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../../" data-static-root-path="../../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">do_something</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">do_<wbr>something</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#warning-doc-only" title="Warning: Doc-Only">Warning: Doc-Only</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>pezpallet_<wbr>for_<wbr>origin::<wbr>dispatchables</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../../index.html">reference_docs</a>::<wbr><a href="../../index.html">frame_origin</a>::<wbr><a href="../index.html">pezpallet_for_origin</a>::<wbr><a href="index.html">dispatchables</a></div><h1>Function <span class="fn">do_<wbr>something</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#134">Source</a> </span></div><pre class="rust item-decl"><code>pub fn do_something<T: <a class="trait" href="../trait.Config.html" title="trait pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin::Config">Config</a>>()</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="warning-doc-only"><a class="doc-anchor" href="#warning-doc-only">§</a>Warning: Doc-Only</h2>
|
||||
<p>This function is an automatically generated, and is doc-only, uncallable
|
||||
stub. See the real version in
|
||||
<a href="../struct.Pezpallet.html#method.do_something" title="associated function pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin::Pezpallet::do_something"><code>Pezpallet::do_something</code></a>.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Auto-generated docs-only module listing all defined dispatchables for this pezpallet."><title>pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin::dispatchables - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../../" data-static-root-path="../../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module dispatchables</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module dispatchables</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#warning-doc-only" title="Warning: Doc-Only">Warning: Doc-Only</a></li></ul><h3><a href="#functions">Module Items</a></h3><ul class="block"><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>pezpallet_<wbr>for_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../../index.html">reference_docs</a>::<wbr><a href="../../index.html">frame_origin</a>::<wbr><a href="../index.html">pezpallet_for_origin</a></div><h1>Module <span>dispatchables</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#134">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Auto-generated docs-only module listing all defined dispatchables for this pezpallet.</p>
|
||||
<h2 id="warning-doc-only"><a class="doc-anchor" href="#warning-doc-only">§</a>Warning: Doc-Only</h2>
|
||||
<p>Members of this module cannot be used directly and are only provided for documentation
|
||||
purposes. To see the real version of each dispatchable, look for them in <a href="../struct.Pezpallet.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin::Pezpallet"><code>Pezpallet</code></a> or
|
||||
<a href="../enum.Call.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin::Call"><code>Call</code></a>.</p>
|
||||
</div></details><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.do_something.html" title="fn pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin::dispatchables::do_something">do_<wbr>something</a></dt><dd>Warning: Doc-Only</dd></dl></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"fn":["do_something"]};
|
||||
+227
File diff suppressed because one or more lines are too long
+19
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The `pezpallet` module in each FRAME pezpallet hosts the most important items needed to construct this pezpallet."><title>pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module pezpallet_for_origin</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module pezpallet_<wbr>for_<wbr>origin</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">frame_origin</a></div><h1>Module <span>pezpallet_<wbr>for_<wbr>origin</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#135">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The <code>pezpallet</code> module in each FRAME pezpallet hosts the most important items needed
|
||||
to construct this pezpallet.</p>
|
||||
<p>The main components of this pezpallet are:</p>
|
||||
<ul>
|
||||
<li>[<code>Pezpallet</code>], which implements all of the dispatchable extrinsics of the pezpallet, among
|
||||
other public functions.
|
||||
<ul>
|
||||
<li>The subset of the functions that are dispatchable can be identified either in the
|
||||
[<code>dispatchables</code>] module or in the [<code>Call</code>] enum.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>[<code>storage_types</code>], which contains the list of all types that are representing a
|
||||
storage item. Otherwise, all storage items are listed among <a href="#types"><em>Type Definitions</em></a>.</li>
|
||||
<li>[<code>Config</code>], which contains the configuration trait of this pezpallet.</li>
|
||||
<li>[<code>Event</code>] and [<code>Error</code>], which are listed among the <a href="#enums"><em>Enums</em></a>.</li>
|
||||
</ul>
|
||||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="dispatchables/index.html" title="mod pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin::dispatchables">dispatchables</a></dt><dd>Auto-generated docs-only module listing all defined dispatchables for this pezpallet.</dd><dt><a class="mod" href="storage_types/index.html" title="mod pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin::storage_types">storage_<wbr>types</a></dt><dd>Auto-generated docs-only module listing all (public and private) defined storage types
|
||||
for this pezpallet.</dd></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Pezpallet.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin::Pezpallet">Pezpallet</a></dt><dd>The <code>Pezpallet</code> struct, the main type that implements traits and standalone
|
||||
functions within the pezpallet.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.Call.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin::Call">Call</a></dt><dd>Contains a variant per dispatchable extrinsic that this pezpallet has.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.Config.html" title="trait pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin::Config">Config</a></dt><dd>Configuration trait of this pezpallet.</dd></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.Module.html" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin::Module">Module</a><wbr><span class="stab deprecated" title="">Deprecated</span></dt><dd>Type alias to <code>Pezpallet</code>, to be used by <code>construct_runtime</code>.</dd></dl></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"enum":["Call"],"mod":["dispatchables","storage_types"],"struct":["Pezpallet"],"trait":["Config"],"type":["Module"]};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Auto-generated docs-only module listing all (public and private) defined storage types for this pezpallet."><title>pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin::storage_types - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../../" data-static-root-path="../../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module storage_types</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module storage_<wbr>types</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#warning-doc-only" title="Warning: Doc-Only">Warning: Doc-Only</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>pezpallet_<wbr>for_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../../index.html">reference_docs</a>::<wbr><a href="../../index.html">frame_origin</a>::<wbr><a href="../index.html">pezpallet_for_origin</a></div><h1>Module <span>storage_<wbr>types</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#134">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Auto-generated docs-only module listing all (public and private) defined storage types
|
||||
for this pezpallet.</p>
|
||||
<h2 id="warning-doc-only"><a class="doc-anchor" href="#warning-doc-only">§</a>Warning: Doc-Only</h2>
|
||||
<p>Members of this module cannot be used directly and are only provided for documentation
|
||||
purposes.</p>
|
||||
<p>To see the actual storage type, find a struct with the same name at the root of the
|
||||
pezpallet, in the list of <a href="../index.html#types"><em>Type Definitions</em></a>.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {};
|
||||
+184
File diff suppressed because one or more lines are too long
+6
@@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Configuration trait of this pezpallet."><title>Config in pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Config</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Config</a></h2><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>pezpallet_<wbr>for_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">frame_origin</a>::<wbr><a href="index.html">pezpallet_for_origin</a></div><h1>Trait <span class="trait">Config</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#139">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Config: Config { }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Configuration trait of this pezpallet.</p>
|
||||
<p>The main purpose of this trait is to act as an interface between this pezpallet and the runtime in
|
||||
which it is embedded in. A type, function, or constant in this trait is essentially left to be
|
||||
configured by the runtime that includes this pezpallet.</p>
|
||||
<p>Consequently, a runtime that wants to include this pezpallet must implement this trait.</p>
|
||||
</div></details><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.91.1/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../../../trait.impl/pezkuwi_sdk_docs/reference_docs/frame_origin/pezpallet_for_origin/trait.Config.js" async></script></section></div></main></body></html>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Type alias to `Pezpallet`, to be used by `construct_runtime`."><title>Module in pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>pezpallet_<wbr>for_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">frame_origin</a>::<wbr><a href="index.html">pezpallet_for_origin</a></div><h1>Type Alias <span class="type">Module</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#141">Source</a> </span></div><pre class="rust item-decl"><code>pub type Module<T> = <a class="struct" href="struct.Pezpallet.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin::Pezpallet">Pezpallet</a><T>;</code></pre><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: use <code>Pezpallet</code> instead</span></div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Type alias to <code>Pezpallet</code>, to be used by <code>construct_runtime</code>.</p>
|
||||
<p>Generated by <code>pezpallet</code> attribute macro.</p>
|
||||
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct Module<T>(<span class="comment">/* private fields */</span>);</code></pre><script src="../../../../type.impl/pezkuwi_sdk_docs/reference_docs/frame_origin/pezpallet_for_origin/struct.Pezpallet.js" data-self-path="pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_for_origin::Module" async></script></section></div></main></body></html>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Warning: Doc-Only"><title>only_validators in pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::dispatchables - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../../" data-static-root-path="../../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">only_validators</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">only_<wbr>validators</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#warning-doc-only" title="Warning: Doc-Only">Warning: Doc-Only</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>pezpallet_<wbr>with_<wbr>custom_<wbr>origin::<wbr>dispatchables</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../../index.html">reference_docs</a>::<wbr><a href="../../index.html">frame_origin</a>::<wbr><a href="../index.html">pezpallet_with_custom_origin</a>::<wbr><a href="index.html">dispatchables</a></div><h1>Function <span class="fn">only_<wbr>validators</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#154">Source</a> </span></div><pre class="rust item-decl"><code>pub fn only_validators<T: <a class="trait" href="../trait.Config.html" title="trait pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Config">Config</a>>()</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="warning-doc-only"><a class="doc-anchor" href="#warning-doc-only">§</a>Warning: Doc-Only</h2>
|
||||
<p>This function is an automatically generated, and is doc-only, uncallable
|
||||
stub. See the real version in
|
||||
<a href="../struct.Pezpallet.html#method.only_validators" title="associated function pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Pezpallet::only_validators"><code>Pezpallet::only_validators</code></a>.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Auto-generated docs-only module listing all defined dispatchables for this pezpallet."><title>pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::dispatchables - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../../" data-static-root-path="../../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module dispatchables</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module dispatchables</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#warning-doc-only" title="Warning: Doc-Only">Warning: Doc-Only</a></li></ul><h3><a href="#functions">Module Items</a></h3><ul class="block"><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>pezpallet_<wbr>with_<wbr>custom_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../../index.html">reference_docs</a>::<wbr><a href="../../index.html">frame_origin</a>::<wbr><a href="../index.html">pezpallet_with_custom_origin</a></div><h1>Module <span>dispatchables</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#154">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Auto-generated docs-only module listing all defined dispatchables for this pezpallet.</p>
|
||||
<h2 id="warning-doc-only"><a class="doc-anchor" href="#warning-doc-only">§</a>Warning: Doc-Only</h2>
|
||||
<p>Members of this module cannot be used directly and are only provided for documentation
|
||||
purposes. To see the real version of each dispatchable, look for them in <a href="../struct.Pezpallet.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Pezpallet"><code>Pezpallet</code></a> or
|
||||
<a href="../enum.Call.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Call"><code>Call</code></a>.</p>
|
||||
</div></details><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.only_validators.html" title="fn pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::dispatchables::only_validators">only_<wbr>validators</a></dt><dd>Warning: Doc-Only</dd></dl></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"fn":["only_validators"]};
|
||||
+227
File diff suppressed because one or more lines are too long
+216
File diff suppressed because one or more lines are too long
+19
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The `pezpallet` module in each FRAME pezpallet hosts the most important items needed to construct this pezpallet."><title>pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module pezpallet_with_custom_origin</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module pezpallet_<wbr>with_<wbr>custom_<wbr>origin</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">frame_origin</a></div><h1>Module <span>pezpallet_<wbr>with_<wbr>custom_<wbr>origin</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#155">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The <code>pezpallet</code> module in each FRAME pezpallet hosts the most important items needed
|
||||
to construct this pezpallet.</p>
|
||||
<p>The main components of this pezpallet are:</p>
|
||||
<ul>
|
||||
<li>[<code>Pezpallet</code>], which implements all of the dispatchable extrinsics of the pezpallet, among
|
||||
other public functions.
|
||||
<ul>
|
||||
<li>The subset of the functions that are dispatchable can be identified either in the
|
||||
[<code>dispatchables</code>] module or in the [<code>Call</code>] enum.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>[<code>storage_types</code>], which contains the list of all types that are representing a
|
||||
storage item. Otherwise, all storage items are listed among <a href="#types"><em>Type Definitions</em></a>.</li>
|
||||
<li>[<code>Config</code>], which contains the configuration trait of this pezpallet.</li>
|
||||
<li>[<code>Event</code>] and [<code>Error</code>], which are listed among the <a href="#enums"><em>Enums</em></a>.</li>
|
||||
</ul>
|
||||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="dispatchables/index.html" title="mod pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::dispatchables">dispatchables</a></dt><dd>Auto-generated docs-only module listing all defined dispatchables for this pezpallet.</dd><dt><a class="mod" href="storage_types/index.html" title="mod pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::storage_types">storage_<wbr>types</a></dt><dd>Auto-generated docs-only module listing all (public and private) defined storage types
|
||||
for this pezpallet.</dd></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Pezpallet.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Pezpallet">Pezpallet</a></dt><dd>The <code>Pezpallet</code> struct, the main type that implements traits and standalone
|
||||
functions within the pezpallet.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.Call.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Call">Call</a></dt><dd>Contains a variant per dispatchable extrinsic that this pezpallet has.</dd><dt><a class="enum" href="enum.Origin.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Origin">Origin</a></dt><dd>A dummy custom origin.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.Config.html" title="trait pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Config">Config</a></dt><dd>Configuration trait of this pezpallet.</dd></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.Module.html" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Module">Module</a><wbr><span class="stab deprecated" title="">Deprecated</span></dt><dd>Type alias to <code>Pezpallet</code>, to be used by <code>construct_runtime</code>.</dd></dl></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"enum":["Call","Origin"],"mod":["dispatchables","storage_types"],"struct":["Pezpallet"],"trait":["Config"],"type":["Module"]};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Auto-generated docs-only module listing all (public and private) defined storage types for this pezpallet."><title>pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::storage_types - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../../" data-static-root-path="../../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module storage_types</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module storage_<wbr>types</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#warning-doc-only" title="Warning: Doc-Only">Warning: Doc-Only</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>pezpallet_<wbr>with_<wbr>custom_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../../index.html">reference_docs</a>::<wbr><a href="../../index.html">frame_origin</a>::<wbr><a href="../index.html">pezpallet_with_custom_origin</a></div><h1>Module <span>storage_<wbr>types</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#154">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Auto-generated docs-only module listing all (public and private) defined storage types
|
||||
for this pezpallet.</p>
|
||||
<h2 id="warning-doc-only"><a class="doc-anchor" href="#warning-doc-only">§</a>Warning: Doc-Only</h2>
|
||||
<p>Members of this module cannot be used directly and are only provided for documentation
|
||||
purposes.</p>
|
||||
<p>To see the actual storage type, find a struct with the same name at the root of the
|
||||
pezpallet, in the list of <a href="../index.html#types"><em>Type Definitions</em></a>.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {};
|
||||
+186
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Configuration trait of this pezpallet."><title>Config in pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Config</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Config</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.RuntimeOrigin" title="RuntimeOrigin">RuntimeOrigin</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>pezpallet_<wbr>with_<wbr>custom_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">frame_origin</a>::<wbr><a href="index.html">pezpallet_with_custom_origin</a></div><h1>Trait <span class="trait">Config</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#160-163">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Config: Config {
|
||||
type <a href="#associatedtype.RuntimeOrigin" class="associatedtype">RuntimeOrigin</a>: <a class="trait" href="https://doc.rust-lang.org/1.91.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><<Self as Config>::RuntimeOrigin> + <a class="trait" href="https://doc.rust-lang.org/1.91.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/1.91.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="enum.Origin.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Origin">Origin</a>, <Self as <a class="trait" href="trait.Config.html" title="trait pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Config">Config</a>>::<a class="associatedtype" href="trait.Config.html#associatedtype.RuntimeOrigin" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Config::RuntimeOrigin">RuntimeOrigin</a>>>;
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Configuration trait of this pezpallet.</p>
|
||||
<p>The main purpose of this trait is to act as an interface between this pezpallet and the runtime in
|
||||
which it is embedded in. A type, function, or constant in this trait is essentially left to be
|
||||
configured by the runtime that includes this pezpallet.</p>
|
||||
<p>Consequently, a runtime that wants to include this pezpallet must implement this trait.</p>
|
||||
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><section id="associatedtype.RuntimeOrigin" class="method"><a class="src rightside" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#161-162">Source</a><h4 class="code-header">type <a href="#associatedtype.RuntimeOrigin" class="associatedtype">RuntimeOrigin</a>: <a class="trait" href="https://doc.rust-lang.org/1.91.1/core/convert/trait.From.html" title="trait core::convert::From">From</a><<Self as Config>::RuntimeOrigin> + <a class="trait" href="https://doc.rust-lang.org/1.91.1/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><<a class="enum" href="https://doc.rust-lang.org/1.91.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="enum.Origin.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Origin">Origin</a>, <Self as <a class="trait" href="trait.Config.html" title="trait pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Config">Config</a>>::<a class="associatedtype" href="trait.Config.html#associatedtype.RuntimeOrigin" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Config::RuntimeOrigin">RuntimeOrigin</a>>></h4></section></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.91.1/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-Config-for-Runtime" class="impl"><a class="src rightside" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#224-226">Source</a><a href="#impl-Config-for-Runtime" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Config.html" title="trait pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Config">Config</a> for <a class="struct" href="../runtime_for_origin/struct.Runtime.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::Runtime">Runtime</a></h3></section></summary><div class="impl-items"><section id="associatedtype.RuntimeOrigin-1" class="associatedtype trait-impl"><a class="src rightside" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#225">Source</a><a href="#associatedtype.RuntimeOrigin-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.RuntimeOrigin" class="associatedtype">RuntimeOrigin</a> = <a class="struct" href="../runtime_for_origin/struct.RuntimeOrigin.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::RuntimeOrigin">RuntimeOrigin</a></h4></section></div></details></div><script src="../../../../trait.impl/pezkuwi_sdk_docs/reference_docs/frame_origin/pezpallet_with_custom_origin/trait.Config.js" async></script></section></div></main></body></html>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Type alias to `Pezpallet`, to be used by `construct_runtime`."><title>Module in pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>pezpallet_<wbr>with_<wbr>custom_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">frame_origin</a>::<wbr><a href="index.html">pezpallet_with_custom_origin</a></div><h1>Type Alias <span class="type">Module</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#165">Source</a> </span></div><pre class="rust item-decl"><code>pub type Module<T> = <a class="struct" href="struct.Pezpallet.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Pezpallet">Pezpallet</a><T>;</code></pre><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: use <code>Pezpallet</code> instead</span></div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Type alias to <code>Pezpallet</code>, to be used by <code>construct_runtime</code>.</p>
|
||||
<p>Generated by <code>pezpallet</code> attribute macro.</p>
|
||||
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct Module<T>(<span class="comment">/* private fields */</span>);</code></pre><script src="../../../../type.impl/pezkuwi_sdk_docs/reference_docs/frame_origin/pezpallet_with_custom_origin/struct.Pezpallet.js" data-self-path="pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_custom_origin::Module" async></script></section></div></main></body></html>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Warning: Doc-Only"><title>externally_checked_ext in pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::dispatchables - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../../" data-static-root-path="../../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">externally_checked_ext</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">externally_<wbr>checked_<wbr>ext</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#warning-doc-only" title="Warning: Doc-Only">Warning: Doc-Only</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>pezpallet_<wbr>with_<wbr>external_<wbr>origin::<wbr>dispatchables</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../../index.html">reference_docs</a>::<wbr><a href="../../index.html">frame_origin</a>::<wbr><a href="../index.html">pezpallet_with_external_origin</a>::<wbr><a href="index.html">dispatchables</a></div><h1>Function <span class="fn">externally_<wbr>checked_<wbr>ext</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#229">Source</a> </span></div><pre class="rust item-decl"><code>pub fn externally_checked_ext<T: <a class="trait" href="../trait.Config.html" title="trait pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::Config">Config</a>>()</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="warning-doc-only"><a class="doc-anchor" href="#warning-doc-only">§</a>Warning: Doc-Only</h2>
|
||||
<p>This function is an automatically generated, and is doc-only, uncallable
|
||||
stub. See the real version in
|
||||
<a href="../struct.Pezpallet.html#method.externally_checked_ext" title="associated function pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::Pezpallet::externally_checked_ext"><code>Pezpallet::externally_checked_ext</code></a>.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Auto-generated docs-only module listing all defined dispatchables for this pezpallet."><title>pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::dispatchables - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../../" data-static-root-path="../../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module dispatchables</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module dispatchables</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#warning-doc-only" title="Warning: Doc-Only">Warning: Doc-Only</a></li></ul><h3><a href="#functions">Module Items</a></h3><ul class="block"><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>pezpallet_<wbr>with_<wbr>external_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../../index.html">reference_docs</a>::<wbr><a href="../../index.html">frame_origin</a>::<wbr><a href="../index.html">pezpallet_with_external_origin</a></div><h1>Module <span>dispatchables</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#229">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Auto-generated docs-only module listing all defined dispatchables for this pezpallet.</p>
|
||||
<h2 id="warning-doc-only"><a class="doc-anchor" href="#warning-doc-only">§</a>Warning: Doc-Only</h2>
|
||||
<p>Members of this module cannot be used directly and are only provided for documentation
|
||||
purposes. To see the real version of each dispatchable, look for them in <a href="../struct.Pezpallet.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::Pezpallet"><code>Pezpallet</code></a> or
|
||||
<a href="../enum.Call.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::Call"><code>Call</code></a>.</p>
|
||||
</div></details><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.externally_checked_ext.html" title="fn pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::dispatchables::externally_checked_ext">externally_<wbr>checked_<wbr>ext</a></dt><dd>Warning: Doc-Only</dd></dl></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"fn":["externally_checked_ext"]};
|
||||
+227
File diff suppressed because one or more lines are too long
+19
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The `pezpallet` module in each FRAME pezpallet hosts the most important items needed to construct this pezpallet."><title>pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module pezpallet_with_external_origin</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module pezpallet_<wbr>with_<wbr>external_<wbr>origin</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">frame_origin</a></div><h1>Module <span>pezpallet_<wbr>with_<wbr>external_<wbr>origin</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#230">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The <code>pezpallet</code> module in each FRAME pezpallet hosts the most important items needed
|
||||
to construct this pezpallet.</p>
|
||||
<p>The main components of this pezpallet are:</p>
|
||||
<ul>
|
||||
<li>[<code>Pezpallet</code>], which implements all of the dispatchable extrinsics of the pezpallet, among
|
||||
other public functions.
|
||||
<ul>
|
||||
<li>The subset of the functions that are dispatchable can be identified either in the
|
||||
[<code>dispatchables</code>] module or in the [<code>Call</code>] enum.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>[<code>storage_types</code>], which contains the list of all types that are representing a
|
||||
storage item. Otherwise, all storage items are listed among <a href="#types"><em>Type Definitions</em></a>.</li>
|
||||
<li>[<code>Config</code>], which contains the configuration trait of this pezpallet.</li>
|
||||
<li>[<code>Event</code>] and [<code>Error</code>], which are listed among the <a href="#enums"><em>Enums</em></a>.</li>
|
||||
</ul>
|
||||
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="dispatchables/index.html" title="mod pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::dispatchables">dispatchables</a></dt><dd>Auto-generated docs-only module listing all defined dispatchables for this pezpallet.</dd><dt><a class="mod" href="storage_types/index.html" title="mod pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::storage_types">storage_<wbr>types</a></dt><dd>Auto-generated docs-only module listing all (public and private) defined storage types
|
||||
for this pezpallet.</dd></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Pezpallet.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::Pezpallet">Pezpallet</a></dt><dd>The <code>Pezpallet</code> struct, the main type that implements traits and standalone
|
||||
functions within the pezpallet.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.Call.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::Call">Call</a></dt><dd>Contains a variant per dispatchable extrinsic that this pezpallet has.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.Config.html" title="trait pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::Config">Config</a></dt><dd>Configuration trait of this pezpallet.</dd></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.Module.html" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::Module">Module</a><wbr><span class="stab deprecated" title="">Deprecated</span></dt><dd>Type alias to <code>Pezpallet</code>, to be used by <code>construct_runtime</code>.</dd></dl></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"enum":["Call"],"mod":["dispatchables","storage_types"],"struct":["Pezpallet"],"trait":["Config"],"type":["Module"]};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Auto-generated docs-only module listing all (public and private) defined storage types for this pezpallet."><title>pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::storage_types - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../../" data-static-root-path="../../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module storage_types</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module storage_<wbr>types</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#warning-doc-only" title="Warning: Doc-Only">Warning: Doc-Only</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>pezpallet_<wbr>with_<wbr>external_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../../index.html">reference_docs</a>::<wbr><a href="../../index.html">frame_origin</a>::<wbr><a href="../index.html">pezpallet_with_external_origin</a></div><h1>Module <span>storage_<wbr>types</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#229">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Auto-generated docs-only module listing all (public and private) defined storage types
|
||||
for this pezpallet.</p>
|
||||
<h2 id="warning-doc-only"><a class="doc-anchor" href="#warning-doc-only">§</a>Warning: Doc-Only</h2>
|
||||
<p>Members of this module cannot be used directly and are only provided for documentation
|
||||
purposes.</p>
|
||||
<p>To see the actual storage type, find a struct with the same name at the root of the
|
||||
pezpallet, in the list of <a href="../index.html#types"><em>Type Definitions</em></a>.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {};
|
||||
+186
File diff suppressed because one or more lines are too long
+8
@@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Configuration trait of this pezpallet."><title>Config in pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Config</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Config</a></h2><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.ExternalOrigin" title="ExternalOrigin">ExternalOrigin</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>pezpallet_<wbr>with_<wbr>external_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">frame_origin</a>::<wbr><a href="index.html">pezpallet_with_external_origin</a></div><h1>Trait <span class="trait">Config</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#234-236">Source</a> </span></div><pre class="rust item-decl"><code>pub trait Config: Config {
|
||||
type <a href="#associatedtype.ExternalOrigin" class="associatedtype">ExternalOrigin</a>: EnsureOrigin<Self::RuntimeOrigin>;
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Configuration trait of this pezpallet.</p>
|
||||
<p>The main purpose of this trait is to act as an interface between this pezpallet and the runtime in
|
||||
which it is embedded in. A type, function, or constant in this trait is essentially left to be
|
||||
configured by the runtime that includes this pezpallet.</p>
|
||||
<p>Consequently, a runtime that wants to include this pezpallet must implement this trait.</p>
|
||||
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><section id="associatedtype.ExternalOrigin" class="method"><a class="src rightside" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#235">Source</a><h4 class="code-header">type <a href="#associatedtype.ExternalOrigin" class="associatedtype">ExternalOrigin</a>: EnsureOrigin<Self::RuntimeOrigin></h4></section></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.91.1/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-Config-for-Runtime" class="impl"><a class="src rightside" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#268-270">Source</a><a href="#impl-Config-for-Runtime" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.Config.html" title="trait pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::Config">Config</a> for <a class="struct" href="../runtime_for_external_origin/struct.Runtime.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::Runtime">Runtime</a></h3></section></summary><div class="impl-items"><section id="associatedtype.ExternalOrigin-1" class="associatedtype trait-impl"><a class="src rightside" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#269">Source</a><a href="#associatedtype.ExternalOrigin-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.ExternalOrigin" class="associatedtype">ExternalOrigin</a> = EnsureSigned<<<a class="struct" href="../runtime_for_external_origin/struct.Runtime.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::Runtime">Runtime</a> as Config>::AccountId></h4></section></div></details></div><script src="../../../../trait.impl/pezkuwi_sdk_docs/reference_docs/frame_origin/pezpallet_with_external_origin/trait.Config.js" async></script></section></div></main></body></html>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Type alias to `Pezpallet`, to be used by `construct_runtime`."><title>Module in pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>pezpallet_<wbr>with_<wbr>external_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">frame_origin</a>::<wbr><a href="index.html">pezpallet_with_external_origin</a></div><h1>Type Alias <span class="type">Module</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#238">Source</a> </span></div><pre class="rust item-decl"><code>pub type Module<T> = <a class="struct" href="struct.Pezpallet.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::Pezpallet">Pezpallet</a><T>;</code></pre><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated: use <code>Pezpallet</code> instead</span></div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Type alias to <code>Pezpallet</code>, to be used by <code>construct_runtime</code>.</p>
|
||||
<p>Generated by <code>pezpallet</code> attribute macro.</p>
|
||||
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct Module<T>(<span class="comment">/* private fields */</span>);</code></pre><script src="../../../../type.impl/pezkuwi_sdk_docs/reference_docs/frame_origin/pezpallet_with_external_origin/struct.Pezpallet.js" data-self-path="pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::Module" async></script></section></div></main></body></html>
|
||||
+212
File diff suppressed because one or more lines are too long
+230
File diff suppressed because one or more lines are too long
+195
File diff suppressed because one or more lines are too long
+210
File diff suppressed because one or more lines are too long
+208
File diff suppressed because one or more lines are too long
+208
File diff suppressed because one or more lines are too long
+208
File diff suppressed because one or more lines are too long
+208
File diff suppressed because one or more lines are too long
+208
File diff suppressed because one or more lines are too long
+211
File diff suppressed because one or more lines are too long
+3
@@ -0,0 +1,3 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `runtime_for_external_origin` mod in crate `pezkuwi_sdk_docs`."><title>pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module runtime_for_external_origin</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module runtime_<wbr>for_<wbr>external_<wbr>origin</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">frame_origin</a></div><h1>Module <span>runtime_<wbr>for_<wbr>external_<wbr>origin</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#251">Source</a> </span></div><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.PalletInfo.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::PalletInfo">Pallet<wbr>Info</a></dt><dd>Provides an implementation of <code>PalletInfo</code> to provide information
|
||||
about the pezpallet setup in the runtime.</dd><dt><a class="struct" href="struct.Runtime.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::Runtime">Runtime</a></dt><dt><a class="struct" href="struct.RuntimeGenesisConfig.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::RuntimeGenesisConfig">Runtime<wbr>Genesis<wbr>Config</a></dt><dt><a class="struct" href="struct.RuntimeOrigin.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::RuntimeOrigin">Runtime<wbr>Origin</a></dt><dd>The runtime origin type representing the origin of a call.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.OriginCaller.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::OriginCaller">Origin<wbr>Caller</a></dt><dt><a class="enum" href="enum.RuntimeCall.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::RuntimeCall">Runtime<wbr>Call</a></dt><dd>The aggregated runtime call type.</dd><dt><a class="enum" href="enum.RuntimeError.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::RuntimeError">Runtime<wbr>Error</a></dt><dt><a class="enum" href="enum.RuntimeEvent.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::RuntimeEvent">Runtime<wbr>Event</a></dt><dt><a class="enum" href="enum.RuntimeFreezeReason.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::RuntimeFreezeReason">Runtime<wbr>Freeze<wbr>Reason</a></dt><dd>A reason for placing a freeze on funds.</dd><dt><a class="enum" href="enum.RuntimeHoldReason.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::RuntimeHoldReason">Runtime<wbr>Hold<wbr>Reason</a></dt><dd>A reason for placing a hold on funds.</dd><dt><a class="enum" href="enum.RuntimeLockId.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::RuntimeLockId">Runtime<wbr>Lock<wbr>Id</a></dt><dd>An identifier for each lock placed on funds.</dd><dt><a class="enum" href="enum.RuntimeSlashReason.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::RuntimeSlashReason">Runtime<wbr>Slash<wbr>Reason</a></dt><dd>A reason for slashing funds.</dd><dt><a class="enum" href="enum.RuntimeTask.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::RuntimeTask">Runtime<wbr>Task</a></dt><dd>An aggregation of all <code>Task</code> enums across all pallets included in the current runtime.</dd><dt><a class="enum" href="enum.RuntimeViewFunction.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::RuntimeViewFunction">Runtime<wbr>View<wbr>Function</a></dt><dd>Runtime query type.</dd></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.AllPalletsWithSystem.html" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::AllPalletsWithSystem">AllPallets<wbr>With<wbr>System</a></dt><dd>All pallets included in the runtime as a nested tuple of types.</dd><dt><a class="type" href="type.AllPalletsWithoutSystem.html" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::AllPalletsWithoutSystem">AllPallets<wbr>Without<wbr>System</a></dt><dd>All pallets included in the runtime as a nested tuple of types.
|
||||
Excludes the System pezpallet.</dd><dt><a class="type" href="type.PalletWithExternalOrigin.html" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::PalletWithExternalOrigin">Pallet<wbr>With<wbr>External<wbr>Origin</a></dt><dt><a class="type" href="type.System.html" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::System">System</a></dt><dt><a class="type" href="type.SystemConfig.html" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::SystemConfig">System<wbr>Config</a></dt></dl></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"enum":["OriginCaller","RuntimeCall","RuntimeError","RuntimeEvent","RuntimeFreezeReason","RuntimeHoldReason","RuntimeLockId","RuntimeSlashReason","RuntimeTask","RuntimeViewFunction"],"struct":["PalletInfo","Runtime","RuntimeGenesisConfig","RuntimeOrigin"],"type":["AllPalletsWithSystem","AllPalletsWithoutSystem","PalletWithExternalOrigin","System","SystemConfig"]};
|
||||
+155
File diff suppressed because one or more lines are too long
+178
File diff suppressed because one or more lines are too long
+166
File diff suppressed because one or more lines are too long
+168
File diff suppressed because one or more lines are too long
+2
@@ -0,0 +1,2 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="All pallets included in the runtime as a nested tuple of types."><title>AllPalletsWithSystem in pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">AllPalletsWithSystem</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>runtime_<wbr>for_<wbr>external_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">frame_origin</a>::<wbr><a href="index.html">runtime_for_external_origin</a></div><h1>Type Alias <span class="type">AllPallets<wbr>With<wbr>System</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#255-260">Source</a> </span></div><pre class="rust item-decl"><code>pub type AllPalletsWithSystem = (<a class="type" href="type.System.html" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::System">System</a>, <a class="type" href="type.PalletWithExternalOrigin.html" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::PalletWithExternalOrigin">PalletWithExternalOrigin</a>);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>All pallets included in the runtime as a nested tuple of types.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="All pallets included in the runtime as a nested tuple of types. Excludes the System pezpallet."><title>AllPalletsWithoutSystem in pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">AllPalletsWithoutSystem</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>runtime_<wbr>for_<wbr>external_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">frame_origin</a>::<wbr><a href="index.html">runtime_for_external_origin</a></div><h1>Type Alias <span class="type">AllPallets<wbr>Without<wbr>System</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#255-260">Source</a> </span></div><pre class="rust item-decl"><code>pub type AllPalletsWithoutSystem = (<a class="type" href="type.PalletWithExternalOrigin.html" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::PalletWithExternalOrigin">PalletWithExternalOrigin</a>,);</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>All pallets included in the runtime as a nested tuple of types.
|
||||
Excludes the System pezpallet.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `PalletWithExternalOrigin` type in crate `pezkuwi_sdk_docs`."><title>PalletWithExternalOrigin in pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">PalletWithExternalOrigin</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Pallet<wbr>With<wbr>External<wbr>Origin</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>runtime_<wbr>for_<wbr>external_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">frame_origin</a>::<wbr><a href="index.html">runtime_for_external_origin</a></div><h1>Type Alias <span class="type">Pallet<wbr>With<wbr>External<wbr>Origin</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#255-260">Source</a> </span></div><pre class="rust item-decl"><code>pub type PalletWithExternalOrigin = <a class="struct" href="../pezpallet_with_external_origin/struct.Pezpallet.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::pezpallet_with_external_origin::Pezpallet">Pezpallet</a><<a class="struct" href="struct.Runtime.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::Runtime">Runtime</a>>;</code></pre><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct PalletWithExternalOrigin(<span class="comment">/* private fields */</span>);</code></pre><script src="../../../../type.impl/pezkuwi_sdk_docs/reference_docs/frame_origin/pezpallet_with_external_origin/struct.Pezpallet.js" data-self-path="pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::PalletWithExternalOrigin" async></script></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `System` type in crate `pezkuwi_sdk_docs`."><title>System in pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">System</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">System</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>runtime_<wbr>for_<wbr>external_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">frame_origin</a>::<wbr><a href="index.html">runtime_for_external_origin</a></div><h1>Type Alias <span class="type">System</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#255-260">Source</a> </span></div><pre class="rust item-decl"><code>pub type System = Pezpallet<<a class="struct" href="struct.Runtime.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::Runtime">Runtime</a>>;</code></pre><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct System(<span class="comment">/* private fields */</span>);</code></pre><script src="../../../../type.impl/pezframe_system/pezpallet/struct.Pezpallet.js" data-self-path="pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::System" async></script></section></div></main></body></html>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `SystemConfig` type in crate `pezkuwi_sdk_docs`."><title>SystemConfig in pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc type"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">SystemConfig</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">System<wbr>Config</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3><h3><a href="#fields">Fields</a></h3><ul class="block field"><li><a href="#structfield._config" title="_config">_config</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin::<wbr>runtime_<wbr>for_<wbr>external_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">frame_origin</a>::<wbr><a href="index.html">runtime_for_external_origin</a></div><h1>Type Alias <span class="type">System<wbr>Config</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#255-260">Source</a> </span></div><pre class="rust item-decl"><code>pub type SystemConfig = GenesisConfig<<a class="struct" href="struct.Runtime.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::Runtime">Runtime</a>>;</code></pre><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub struct SystemConfig {
|
||||
pub _config: <a class="struct" href="https://doc.rust-lang.org/1.91.1/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a><<a class="struct" href="struct.Runtime.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::Runtime">Runtime</a>>,
|
||||
}</code></pre><h2 id="fields" class="fields section-header">Fields<a href="#fields" class="anchor">§</a></h2><span id="structfield._config" class="structfield section-header"><a href="#structfield._config" class="anchor field">§</a><code>_config: <a class="struct" href="https://doc.rust-lang.org/1.91.1/core/marker/struct.PhantomData.html" title="struct core::marker::PhantomData">PhantomData</a><<a class="struct" href="struct.Runtime.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::Runtime">Runtime</a>></code></span><script src="../../../../type.impl/pezframe_system/pezpallet/struct.GenesisConfig.js" data-self-path="pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_external_origin::SystemConfig" async></script></section></div></main></body></html>
|
||||
+213
File diff suppressed because one or more lines are too long
+230
File diff suppressed because one or more lines are too long
+195
File diff suppressed because one or more lines are too long
+210
File diff suppressed because one or more lines are too long
+208
File diff suppressed because one or more lines are too long
+208
File diff suppressed because one or more lines are too long
+208
File diff suppressed because one or more lines are too long
+208
File diff suppressed because one or more lines are too long
+208
File diff suppressed because one or more lines are too long
+211
File diff suppressed because one or more lines are too long
+3
@@ -0,0 +1,3 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `runtime_for_origin` mod in crate `pezkuwi_sdk_docs`."><title>pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-e56847b5.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="pezkuwi_sdk_docs" data-themes="" data-resource-suffix="" data-rustdoc-version="1.91.1 (ed61e7d7e 2025-11-07)" data-channel="1.91.1" data-search-js="search-e256b49e.js" data-stringdex-js="stringdex-c3e638e9.js" data-settings-js="settings-c38705f0.js" ><script src="../../../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../../static.files/main-6dc2a7f3.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-263c88ec.css"></noscript><link rel="icon" href="https://pezkuwichain.io/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module runtime_for_origin</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../../pezkuwi_sdk_docs/index.html">pezkuwi_<wbr>sdk_<wbr>docs</a><span class="version">0.0.2</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module runtime_<wbr>for_<wbr>origin</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In pezkuwi_<wbr>sdk_<wbr>docs::<wbr>reference_<wbr>docs::<wbr>frame_<wbr>origin</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../../index.html">pezkuwi_sdk_docs</a>::<wbr><a href="../../index.html">reference_docs</a>::<wbr><a href="../index.html">frame_origin</a></div><h1>Module <span>runtime_<wbr>for_<wbr>origin</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../../src/pezkuwi_sdk_docs/reference_docs/frame_origin.rs.html#207">Source</a> </span></div><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.PalletInfo.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::PalletInfo">Pallet<wbr>Info</a></dt><dd>Provides an implementation of <code>PalletInfo</code> to provide information
|
||||
about the pezpallet setup in the runtime.</dd><dt><a class="struct" href="struct.Runtime.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::Runtime">Runtime</a></dt><dt><a class="struct" href="struct.RuntimeGenesisConfig.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::RuntimeGenesisConfig">Runtime<wbr>Genesis<wbr>Config</a></dt><dt><a class="struct" href="struct.RuntimeOrigin.html" title="struct pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::RuntimeOrigin">Runtime<wbr>Origin</a></dt><dd>The runtime origin type representing the origin of a call.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.OriginCaller.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::OriginCaller">Origin<wbr>Caller</a></dt><dt><a class="enum" href="enum.RuntimeCall.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::RuntimeCall">Runtime<wbr>Call</a></dt><dd>The aggregated runtime call type.</dd><dt><a class="enum" href="enum.RuntimeError.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::RuntimeError">Runtime<wbr>Error</a></dt><dt><a class="enum" href="enum.RuntimeEvent.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::RuntimeEvent">Runtime<wbr>Event</a></dt><dt><a class="enum" href="enum.RuntimeFreezeReason.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::RuntimeFreezeReason">Runtime<wbr>Freeze<wbr>Reason</a></dt><dd>A reason for placing a freeze on funds.</dd><dt><a class="enum" href="enum.RuntimeHoldReason.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::RuntimeHoldReason">Runtime<wbr>Hold<wbr>Reason</a></dt><dd>A reason for placing a hold on funds.</dd><dt><a class="enum" href="enum.RuntimeLockId.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::RuntimeLockId">Runtime<wbr>Lock<wbr>Id</a></dt><dd>An identifier for each lock placed on funds.</dd><dt><a class="enum" href="enum.RuntimeSlashReason.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::RuntimeSlashReason">Runtime<wbr>Slash<wbr>Reason</a></dt><dd>A reason for slashing funds.</dd><dt><a class="enum" href="enum.RuntimeTask.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::RuntimeTask">Runtime<wbr>Task</a></dt><dd>An aggregation of all <code>Task</code> enums across all pallets included in the current runtime.</dd><dt><a class="enum" href="enum.RuntimeViewFunction.html" title="enum pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::RuntimeViewFunction">Runtime<wbr>View<wbr>Function</a></dt><dd>Runtime query type.</dd></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.AllPalletsWithSystem.html" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::AllPalletsWithSystem">AllPallets<wbr>With<wbr>System</a></dt><dd>All pallets included in the runtime as a nested tuple of types.</dd><dt><a class="type" href="type.AllPalletsWithoutSystem.html" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::AllPalletsWithoutSystem">AllPallets<wbr>Without<wbr>System</a></dt><dd>All pallets included in the runtime as a nested tuple of types.
|
||||
Excludes the System pezpallet.</dd><dt><a class="type" href="type.PalletWithCustomOrigin.html" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::PalletWithCustomOrigin">Pallet<wbr>With<wbr>Custom<wbr>Origin</a></dt><dt><a class="type" href="type.System.html" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::System">System</a></dt><dt><a class="type" href="type.SystemConfig.html" title="type pezkuwi_sdk_docs::reference_docs::frame_origin::runtime_for_origin::SystemConfig">System<wbr>Config</a></dt></dl></section></div></main></body></html>
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"enum":["OriginCaller","RuntimeCall","RuntimeError","RuntimeEvent","RuntimeFreezeReason","RuntimeHoldReason","RuntimeLockId","RuntimeSlashReason","RuntimeTask","RuntimeViewFunction"],"struct":["PalletInfo","Runtime","RuntimeGenesisConfig","RuntimeOrigin"],"type":["AllPalletsWithSystem","AllPalletsWithoutSystem","PalletWithCustomOrigin","System","SystemConfig"]};
|
||||
+155
File diff suppressed because one or more lines are too long
+178
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user