Skip to content

Commit

Permalink
Deploy documentation for dev-1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
gRoussac committed Oct 20, 2024
1 parent 66645b1 commit db202cc
Show file tree
Hide file tree
Showing 103 changed files with 399 additions and 367 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!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="Converts a CLValue to a JSON Value."><title>cl_value_to_json in casper_rust_wasm_sdk::helpers - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-492a78a4a87dcc01.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="casper_rust_wasm_sdk" data-themes="" data-resource-suffix="" data-rustdoc-version="1.82.0 (f6e511eec 2024-10-15)" data-channel="1.82.0" data-search-js="search-a99f1315e7cc5121.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-921df33f47b8780c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-3b12f09e550e0385.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../casper_rust_wasm_sdk/index.html">casper_<wbr>rust_<wbr>wasm_<wbr>sdk</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In casper_<wbr>rust_<wbr>wasm_<wbr>sdk::<wbr>helpers</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">casper_rust_wasm_sdk</a>::<wbr><a href="index.html">helpers</a>::<wbr><a class="fn" href="#">cl_value_to_json</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/casper_rust_wasm_sdk/helpers/mod.rs.html#40-42">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub fn cl_value_to_json(cl_value: &amp;<a class="struct" href="https://docs.rs/casper-types/4.0.1/casper_types/cl_value/struct.CLValue.html" title="struct casper_types::cl_value::CLValue">CLValue</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.82.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://docs.rs/serde_json/1.0.129/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Converts a CLValue to a JSON Value.</p>
<!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="Converts a CLValue to a JSON Value."><title>cl_value_to_json in casper_rust_wasm_sdk::helpers - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-492a78a4a87dcc01.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="casper_rust_wasm_sdk" data-themes="" data-resource-suffix="" data-rustdoc-version="1.82.0 (f6e511eec 2024-10-15)" data-channel="1.82.0" data-search-js="search-a99f1315e7cc5121.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-921df33f47b8780c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-3b12f09e550e0385.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../casper_rust_wasm_sdk/index.html">casper_<wbr>rust_<wbr>wasm_<wbr>sdk</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><h2><a href="index.html">In casper_<wbr>rust_<wbr>wasm_<wbr>sdk::<wbr>helpers</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">casper_rust_wasm_sdk</a>::<wbr><a href="index.html">helpers</a>::<wbr><a class="fn" href="#">cl_value_to_json</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/casper_rust_wasm_sdk/helpers/mod.rs.html#40-42">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub fn cl_value_to_json(cl_value: &amp;<a class="struct" href="https://docs.rs/casper-types/4.0.1/casper_types/cl_value/struct.CLValue.html" title="struct casper_types::cl_value::CLValue">CLValue</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/1.82.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://docs.rs/serde_json/1.0.132/serde_json/value/enum.Value.html" title="enum serde_json::value::Value">Value</a>&gt;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Converts a CLValue to a JSON Value.</p>
<h2 id="arguments"><a class="doc-anchor" href="#arguments">§</a>Arguments</h2>
<ul>
<li><code>cl_value</code> - The CLValue to convert.</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +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 `speculative_deploy` mod in crate `casper_rust_wasm_sdk`."><title>casper_rust_wasm_sdk::speculative_deploy - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-492a78a4a87dcc01.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="casper_rust_wasm_sdk" data-themes="" data-resource-suffix="" data-rustdoc-version="1.82.0 (f6e511eec 2024-10-15)" data-channel="1.82.0" data-search-js="search-a99f1315e7cc5121.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-921df33f47b8780c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-3b12f09e550e0385.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../casper_rust_wasm_sdk/index.html">casper_<wbr>rust_<wbr>wasm_<wbr>sdk</a><span class="version">1.0.0</span></h2></div><h2 class="location"><a href="#">Module speculative_<wbr>deploy</a></h2><div class="sidebar-elems"><h2><a href="../index.html">In crate casper_<wbr>rust_<wbr>wasm_<wbr>sdk</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">casper_rust_wasm_sdk</a>::<wbr><a class="mod" href="#">speculative_deploy</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/casper_rust_wasm_sdk/sdk/deploy/speculative_deploy.rs.html#1-282">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div></section></div></main></body></html>
<!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 `speculative_deploy` mod in crate `casper_rust_wasm_sdk`."><title>casper_rust_wasm_sdk::speculative_deploy - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-492a78a4a87dcc01.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="casper_rust_wasm_sdk" data-themes="" data-resource-suffix="" data-rustdoc-version="1.82.0 (f6e511eec 2024-10-15)" data-channel="1.82.0" data-search-js="search-a99f1315e7cc5121.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-118b08c4c78b968e.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-921df33f47b8780c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-3b12f09e550e0385.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></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]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../casper_rust_wasm_sdk/index.html">casper_<wbr>rust_<wbr>wasm_<wbr>sdk</a><span class="version">1.0.0</span></h2></div><h2 class="location"><a href="#">Module speculative_<wbr>deploy</a></h2><div class="sidebar-elems"><h2><a href="../index.html">In crate casper_<wbr>rust_<wbr>wasm_<wbr>sdk</a></h2></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">casper_rust_wasm_sdk</a>::<wbr><a class="mod" href="#">speculative_deploy</a><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><span class="out-of-band"><a class="src" href="../../src/casper_rust_wasm_sdk/sdk/deploy/speculative_deploy.rs.html#1-286">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div></section></div></main></body></html>

Large diffs are not rendered by default.

64 changes: 41 additions & 23 deletions juliet/api-rust/src/casper_rust_wasm_sdk/sdk/contract/mod.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@
<a href="#92" id="92">92</a>
<a href="#93" id="93">93</a>
<a href="#94" id="94">94</a>
<a href="#95" id="95">95</a>
<a href="#96" id="96">96</a>
<a href="#97" id="97">97</a>
<a href="#98" id="98">98</a>
<a href="#99" id="99">99</a>
<a href="#100" id="100">100</a>
<a href="#101" id="101">101</a>
<a href="#102" id="102">102</a>
<a href="#103" id="103">103</a>
</pre></div><pre class="rust"><code><span class="kw">pub mod </span>call_entrypoint;
<span class="kw">pub mod </span>install;
<span class="kw">pub mod </span>query_contract_dict;
Expand All @@ -102,9 +111,13 @@
<span class="attr">#[cfg(test)]
</span><span class="kw">use crate</span>::{helpers::public_key_from_secret_key, types::public_key::PublicKey};
<span class="attr">#[cfg(test)]
</span><span class="kw">use </span>once_cell::sync::Lazy;
<span class="attr">#[cfg(test)]
</span><span class="kw">use </span>sdk_tests::config::{DICTIONARY_ITEM_KEY, DICTIONARY_NAME};
<span class="attr">#[cfg(test)]
</span><span class="kw">use </span>sdk_tests::tests::helpers::mint_nft;
<span class="attr">#[cfg(test)]
</span><span class="kw">use </span>std::sync::Mutex;

<span class="attr">#[cfg(test)]
</span><span class="kw">pub async fn </span>install_cep78() -&gt; String {
Expand Down Expand Up @@ -132,36 +145,41 @@
contract_cep78_hash
}

<span class="attr">#[cfg(test)]
</span><span class="kw">static </span>CONTRACT_CEP78_HASH: Lazy&lt;Mutex&lt;<span class="prelude-ty">Option</span>&lt;String&gt;&gt;&gt; = Lazy::new(|| Mutex::new(<span class="prelude-val">None</span>));

<span class="attr">#[cfg(test)]
</span><span class="kw">pub async fn </span>get_dictionary_item(as_params: bool) -&gt; DictionaryItemInput {
<span class="kw">use </span>sdk_tests::tests::helpers::{get_network_constants, get_user_secret_key};

<span class="kw">static </span><span class="kw-2">mut </span>CONTRACT_CEP78_HASH: <span class="prelude-ty">Option</span>&lt;String&gt; = <span class="prelude-val">None</span>;
<span class="kw">let </span>(node_address, event_address, chain_name) = get_network_constants();

<span class="kw">unsafe </span>{
<span class="kw">if </span>CONTRACT_CEP78_HASH.is_none() {
<span class="kw">let </span>contract_cep78_hash = install_cep78().<span class="kw">await</span>;
<span class="kw">let </span>secret_key = get_user_secret_key(<span class="prelude-val">None</span>).unwrap();
<span class="kw">let </span>account = public_key_from_secret_key(<span class="kw-2">&amp;</span>secret_key).unwrap();
<span class="kw">let </span>public_key = PublicKey::new(<span class="kw-2">&amp;</span>account).unwrap();
<span class="kw">let </span>account_hash = public_key.to_account_hash().to_formatted_string();
mint_nft(
<span class="kw-2">&amp;</span>contract_cep78_hash,
<span class="kw-2">&amp;</span>account,
<span class="kw-2">&amp;</span>account_hash,
<span class="kw-2">&amp;</span>secret_key,
(<span class="kw-2">&amp;</span>node_address, <span class="kw-2">&amp;</span>event_address, <span class="kw-2">&amp;</span>chain_name),
)
.<span class="kw">await</span>;
CONTRACT_CEP78_HASH = <span class="prelude-val">Some</span>(contract_cep78_hash);
}
<span class="kw">if </span>as_params {
get_dictionary_item_params_input(CONTRACT_CEP78_HASH.as_ref().unwrap()).<span class="kw">await
</span>} <span class="kw">else </span>{
get_dictionary_item_input(CONTRACT_CEP78_HASH.as_ref().unwrap()).<span class="kw">await
</span>}
<span class="kw">let </span><span class="kw-2">mut </span>contract_cep78_hash = CONTRACT_CEP78_HASH.lock().unwrap();

<span class="kw">if </span>contract_cep78_hash.is_none() {
<span class="kw">let </span>new_contract_cep78_hash = install_cep78().<span class="kw">await</span>;
<span class="kw">let </span>secret_key = get_user_secret_key(<span class="prelude-val">None</span>).unwrap();
<span class="kw">let </span>account = public_key_from_secret_key(<span class="kw-2">&amp;</span>secret_key).unwrap();
<span class="kw">let </span>public_key = PublicKey::new(<span class="kw-2">&amp;</span>account).unwrap();
<span class="kw">let </span>account_hash = public_key.to_account_hash().to_formatted_string();

mint_nft(
<span class="kw-2">&amp;</span>new_contract_cep78_hash,
<span class="kw-2">&amp;</span>account,
<span class="kw-2">&amp;</span>account_hash,
<span class="kw-2">&amp;</span>secret_key,
(<span class="kw-2">&amp;</span>node_address, <span class="kw-2">&amp;</span>event_address, <span class="kw-2">&amp;</span>chain_name),
)
.<span class="kw">await</span>;

<span class="kw-2">*</span>contract_cep78_hash = <span class="prelude-val">Some</span>(new_contract_cep78_hash);
}

<span class="kw">if </span>as_params {
get_dictionary_item_params_input(contract_cep78_hash.as_ref().unwrap()).<span class="kw">await
</span>} <span class="kw">else </span>{
get_dictionary_item_input(contract_cep78_hash.as_ref().unwrap()).<span class="kw">await
</span>}
}

<span class="attr">#[cfg(test)]
Expand Down
Loading

0 comments on commit db202cc

Please sign in to comment.