mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-28 10:47:57 +00:00
fix(wallet): restore real blockchain WalletDashboard, remove mock Wallet page
This commit is contained in:
@@ -0,0 +1,127 @@
|
||||
<!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="Meta information about this crate, how it is built, what principles dictates its evolution and how one can contribute to it."><title>pezkuwi_sdk_docs::meta_contributing - 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 meta_contributing</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.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module meta_<wbr>contributing</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#contribution" title="Contribution">Contribution</a><ul><li><a href="#why-rust-docs" title="Why Rust Docs?">Why Rust Docs?</a></li><li><a href="#scope" title="Scope">Scope</a></li><li><a href="#principles" title="Principles">Principles</a></li><li><a href="#cratesio-and-publishing" title="`crates.io` and Publishing"><code>crates.io</code> and Publishing</a></li><li><a href="#versioning" title="Versioning">Versioning</a></li><li><a href="#how-to-develop-locally" title="How to Develop Locally">How to Develop Locally</a></li></ul></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate pezkuwi_<wbr>sdk_<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></div><h1>Module <span>meta_<wbr>contributing</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/meta_contributing.rs.html#1-151">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Meta information about this crate, how it is built, what principles dictates its evolution and
|
||||
how one can contribute to it.</p>
|
||||
<h2 id="contribution"><a class="doc-anchor" href="#contribution">§</a>Contribution</h2>
|
||||
<p>The following sections cover more detailed information about this crate and how it should be
|
||||
maintained.</p>
|
||||
<h3 id="why-rust-docs"><a class="doc-anchor" href="#why-rust-docs">§</a>Why Rust Docs?</h3>
|
||||
<p>We acknowledge that blockchain based systems, particularly a cutting-edge one like Pezkuwi SDK
|
||||
is a software artifact that is complex, and rapidly evolving. This makes the task of documenting
|
||||
it externally extremely difficult, especially with regards to making sure it is up-to-date.</p>
|
||||
<p>Consequently, we argue that the best hedge against this is to move as much of the documentation
|
||||
near the source code as possible. This would further incentivize developers to keep the
|
||||
documentation up-to-date, as the overhead is reduced by making sure everything is in one
|
||||
repository, and everything being in <code>.rs</code> files.</p>
|
||||
<blockquote>
|
||||
<p>This is not to say that a more visually appealing version of this crate (for example as an
|
||||
<code>md-book</code>) cannot exist, but it would be outside the scope of this crate.</p>
|
||||
</blockquote>
|
||||
<p>Moreover, we acknowledge that a major pain point has been not only outdated <em>concepts</em>, but also
|
||||
<em>outdated code</em>. For this, we commit to making sure no code-snippet in this crate is left as
|
||||
<code>///ignore</code> or <code>///no_compile</code>, making sure all code snippets are self-contained, compile-able,
|
||||
and correct at every single revision of the entire repository.</p>
|
||||
<blockquote>
|
||||
<p>This also allows us to have a clear versioning on the entire content of this crate. For every
|
||||
commit of the Pezkuwi SDK, there would be one version of this crate that is guaranteed to be
|
||||
correct.</p>
|
||||
</blockquote>
|
||||
<blockquote>
|
||||
<p>To achieve this, we often use <a href="https://github.com/sam0x17/docify"><code>docify</code></a>, a nifty invention
|
||||
of <code>@sam0x17</code>.</p>
|
||||
</blockquote>
|
||||
<p>Also see: <a href="https://github.com/pezkuwichain/pezkuwi-sdk/issues/109">https://github.com/pezkuwichain/pezkuwi-sdk/issues/109</a>.</p>
|
||||
<h3 id="scope"><a class="doc-anchor" href="#scope">§</a>Scope</h3>
|
||||
<p>The above would NOT be attainable if we don’t acknowledge that the scope of this crate MUST be
|
||||
limited, or else its maintenance burden would be infeasible or not worthwhile. In short, future
|
||||
maintainers should always strive to keep the content of this repository as minimal as possible.
|
||||
Some of the following principles are specifically there to be the guidance for this.</p>
|
||||
<h3 id="principles"><a class="doc-anchor" href="#principles">§</a>Principles</h3>
|
||||
<p>The following guidelines are meant to be the guiding torch of those who contribute to this
|
||||
crate.</p>
|
||||
<ol>
|
||||
<li>🔺 Ground Up: Information should be laid out in the most ground-up fashion. The lowest level
|
||||
(i.e. “ground”) is Rust-docs. The highest level (i.e. “up”) is “outside of this crate”. In
|
||||
between lies <a href="../reference_docs/index.html" title="mod pezkuwi_sdk_docs::reference_docs"><code>reference_docs</code></a> and <a href="../guides/index.html" title="mod pezkuwi_sdk_docs::guides"><code>guides</code></a>, from low to high. The point of this principle
|
||||
is to document as much of the information as possible in the lower level media, as it is
|
||||
easier to maintain and more reachable. Then, use excessive linking to back-link when writing
|
||||
in a more high level.</li>
|
||||
</ol>
|
||||
<blockquote>
|
||||
<p>A prime example of this, the details of the FRAME storage APIs should NOT be explained in a
|
||||
high level tutorial. They should be explained in the rust-doc of the corresponding type or
|
||||
macro.</p>
|
||||
</blockquote>
|
||||
<ol start="2">
|
||||
<li>🧘 Less is More: For reasons mentioned <a href="#why-rust-docs">above</a>, the more concise this crate
|
||||
is, the better.</li>
|
||||
<li>√ Don’t Repeat Yourself – DRY: A summary of the above two points. Authors should always
|
||||
strive to avoid any duplicate information. Every concept should ideally be documented in
|
||||
<em>ONE</em> place and one place only. This makes the task of maintaining topics significantly
|
||||
easier.</li>
|
||||
</ol>
|
||||
<blockquote>
|
||||
<p>A prime example of this, the list of CLI arguments of a particular binary should not be
|
||||
documented in multiple places across this crate. It should be only be documented in the
|
||||
corresponding crate (e.g. <code>sc_cli</code>).</p>
|
||||
</blockquote>
|
||||
<blockquote>
|
||||
<p>Moreover, this means that as a contributor, <strong>it is your responsibility to have a grasp over
|
||||
what topics are already covered in this crate, and how you can build on top of the information
|
||||
that they already pose, rather than repeating yourself</strong>.</p>
|
||||
</blockquote>
|
||||
<p>For more details see the <a href="https://github.com/pezkuwichain/pezkuwi-sdk/blob/master/docs/contributor/DOCUMENTATION_GUIDELINES.md">latest documenting
|
||||
guidelines</a>.</p>
|
||||
<h5 id="example-explaining-palletcall"><a class="doc-anchor" href="#example-explaining-palletcall">§</a>Example: Explaining <code>#[pallet::call]</code></h5><details>
|
||||
<summary>
|
||||
Let's consider the seemingly simple example of explaining to someone dead-simple code of a FRAME
|
||||
call and see how we can use the above principles.
|
||||
</summary>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="attr">#[frame::pallet(dev_mode)]
|
||||
</span><span class="kw">pub mod </span>pallet {
|
||||
<span class="attr">#[pallet::call]
|
||||
</span><span class="kw">impl</span><T: Config> Pallet<T> {
|
||||
<span class="kw">pub fn </span>a_simple_call(origin: OriginFor<T>, data: u32) -> DispatchResult {
|
||||
<span class="macro">ensure!</span>(data > <span class="number">10</span>, <span class="string">"SomeStaticString"</span>);
|
||||
<span class="macro">todo!</span>();
|
||||
}
|
||||
}
|
||||
}</code></pre></div>
|
||||
<ul>
|
||||
<li>Before even getting started, what is with all of this <code><T: Config></code>? We link to
|
||||
<a href="../reference_docs/trait_based_programming/index.html" title="mod pezkuwi_sdk_docs::reference_docs::trait_based_programming"><code>crate::reference_docs::trait_based_programming</code></a>.</li>
|
||||
<li>First, the name. Why is this called <code>pallet::call</code>? This goes back to <code>enum Call</code>, which is
|
||||
explained in <a href="../reference_docs/frame_runtime_types/index.html" title="mod pezkuwi_sdk_docs::reference_docs::frame_runtime_types"><code>crate::reference_docs::frame_runtime_types</code></a>. Build on top of this!</li>
|
||||
<li>Then, what is <code>origin</code>? Just an account id? <a href="../reference_docs/frame_origin/index.html" title="mod pezkuwi_sdk_docs::reference_docs::frame_origin"><code>crate::reference_docs::frame_origin</code></a>.</li>
|
||||
<li>Then, what is <code>DispatchResult</code>? Why is this called <em>dispatch</em>? Probably something that can be
|
||||
explained in the documentation of [<code>frame::prelude::DispatchResult</code>].</li>
|
||||
<li>Why is <code>"SomeStaticString"</code> a valid error? Because there is implementation for it that you can
|
||||
see <a href="frame::prelude::DispatchError#impl-From%3C%26'static+str%3E-for-DispatchError">here</a>.</li>
|
||||
</ul>
|
||||
<p>All of these are examples of underlying information that a contributor should:</p>
|
||||
<ol>
|
||||
<li>Try and create and they are going along.</li>
|
||||
<li>Back-link to if they already exist.</li>
|
||||
</ol>
|
||||
<p>Of course, all of this is not set in stone as a either/or rule. Sometimes, it is necessary to
|
||||
rephrase a concept in a new context.</p>
|
||||
</details>
|
||||
<h3 id="cratesio-and-publishing"><a class="doc-anchor" href="#cratesio-and-publishing">§</a><code>crates.io</code> and Publishing</h3>
|
||||
<p>As it stands now, this crate cannot be published to crates.io because of its use of
|
||||
<a href="https://github.com/sam0x17/docify/issues/22">workspace-level <code>docify</code></a>. For now, we accept this
|
||||
compromise, but in the long term, we should work towards finding a way to maintain different
|
||||
revisions of this crate.</p>
|
||||
<h3 id="versioning"><a class="doc-anchor" href="#versioning">§</a>Versioning</h3>
|
||||
<p>So long as not deployed in <code>crates.io</code>, please notice that all of the information in this crate,
|
||||
namely in <a href="../guides/index.html" title="mod pezkuwi_sdk_docs::guides"><code>crate::guides</code></a> and such are compatible with the master branch of <code>pezkuwi-sdk</code>. A
|
||||
few solutions have been proposed to improve this, please see
|
||||
<a href="https://github.com/pezkuwichain/pezkuwi-sdk/issues/146">here</a>.</p>
|
||||
<h3 id="how-to-develop-locally"><a class="doc-anchor" href="#how-to-develop-locally">§</a>How to Develop Locally</h3>
|
||||
<p>To view the docs specific <a href="../index.html" title="mod pezkuwi_sdk_docs"><code>crate</code></a> locally for development, including the correct HTML headers
|
||||
injected, run:</p>
|
||||
<div class="example-wrap"><pre class="language-sh"><code>SKIP_WASM_BUILD=1 \
|
||||
RUSTDOCFLAGS="--html-in-header $(pwd)/docs/sdk/assets/header.html --extend-css $(pwd)/docs/sdk/assets/theme.css --default-theme=ayu" \
|
||||
cargo doc -p pezkuwi-sdk-docs --no-deps --open</code></pre></div>
|
||||
<p>If even faster build time for docs is needed, you can temporarily remove most of the
|
||||
substrate/cumulus dependencies that are only used for linking purposes.</p>
|
||||
<p>For more on local development, see <a href="../reference_docs/development_environment_advice/index.html" title="mod pezkuwi_sdk_docs::reference_docs::development_environment_advice"><code>crate::reference_docs::development_environment_advice</code></a>.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {};
|
||||
Reference in New Issue
Block a user