<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tyler van der Hoeven</title>
    <description>The latest articles on DEV Community by Tyler van der Hoeven (@tyvdh).</description>
    <link>https://dev.to/tyvdh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2845%2F36000790-e75e-4fd1-86ac-1a1058af988b.png</url>
      <title>DEV Community: Tyler van der Hoeven</title>
      <link>https://dev.to/tyvdh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tyvdh"/>
    <language>en</language>
    <item>
      <title>RPCiege: How to Complete Skirmish No.1</title>
      <dc:creator>Tyler van der Hoeven</dc:creator>
      <pubDate>Tue, 27 Jun 2023 19:30:53 +0000</pubDate>
      <link>https://dev.to/stellar/rpciege-how-to-complete-skirmish-no1-148</link>
      <guid>https://dev.to/stellar/rpciege-how-to-complete-skirmish-no1-148</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Earn digital collectible playing cards in &lt;a href="https://rpciege.com/" rel="noopener noreferrer"&gt;RPCiege&lt;/a&gt;, a smart contract coding game teaching the fundamentals of developing and deploying performant and secure blockchain applications though small, fun, code puzzles.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Skirmish 1 of the RPCiege couldn't be any more straight forward. All you've gotta do is successfully invoke a Soroban smart contract on the &lt;code&gt;Futurenet&lt;/code&gt; network via the official RPCiege RPC endpoint &lt;code&gt;https://futurenet.rpciege.com:443&lt;/code&gt;. Definitely simple however the things you'll learn here will form the foundation for all other Skirmishes so be sure you take your time to fully understand each step of the process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: &lt;strong&gt;Create a new Soroban smart contract project&lt;/strong&gt;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;small&gt;Consult &lt;a href="https://soroban.stellar.org/docs/getting-started/hello-world" rel="noopener noreferrer"&gt;https://soroban.stellar.org/docs/getting-started/hello-world&lt;/a&gt; for more details&lt;/small&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Using the Cargo CLI you installed during the Setup step create a new Rust project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo new &lt;span class="nt"&gt;--lib&lt;/span&gt; &amp;lt;project-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From here &lt;code&gt;cd&lt;/code&gt; into your new project and edit your &lt;code&gt;Cargo.toml&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="nn"&gt;[package]&lt;/span&gt;
&lt;span class="py"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"project-name"&lt;/span&gt;
&lt;span class="py"&gt;version&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"0.1.0"&lt;/span&gt;
&lt;span class="py"&gt;edition&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"2021"&lt;/span&gt;

&lt;span class="nn"&gt;[lib]&lt;/span&gt;
&lt;span class="py"&gt;crate-type&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"cdylib"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="nn"&gt;[features]&lt;/span&gt;
&lt;span class="py"&gt;testutils&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"soroban-sdk/testutils"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="nn"&gt;[dependencies]&lt;/span&gt;
&lt;span class="py"&gt;soroban-sdk&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"0.8.4"&lt;/span&gt;

&lt;span class="nn"&gt;[dev_dependencies]&lt;/span&gt;
&lt;span class="py"&gt;soroban-sdk&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="py"&gt;version&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"0.8.4"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="py"&gt;features&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"testutils"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nn"&gt;[profile.release]&lt;/span&gt;
&lt;span class="py"&gt;opt-level&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"z"&lt;/span&gt;
&lt;span class="py"&gt;overflow-checks&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="py"&gt;debug&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="py"&gt;strip&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"symbols"&lt;/span&gt;
&lt;span class="py"&gt;debug-assertions&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="py"&gt;panic&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"abort"&lt;/span&gt;
&lt;span class="py"&gt;codegen-units&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="py"&gt;lto&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: &lt;strong&gt;Construct a new empty contract&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;From here navigate to the &lt;code&gt;src&lt;/code&gt; directory and modify the &lt;code&gt;lib.rs&lt;/code&gt; file as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nd"&gt;#![no_std]&lt;/span&gt;

&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;soroban_sdk&lt;/span&gt;&lt;span class="p"&gt;::{&lt;/span&gt;&lt;span class="n"&gt;contractimpl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Env&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Contract&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nd"&gt;#[contractimpl]&lt;/span&gt;
&lt;span class="k"&gt;impl&lt;/span&gt; &lt;span class="n"&gt;Contract&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;pub&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_nft_dest&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Option&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Address&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;mod&lt;/span&gt; &lt;span class="n"&gt;test&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next create a &lt;code&gt;test.rs&lt;/code&gt; file with the following contents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nd"&gt;#![cfg(test)]&lt;/span&gt;

&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="k"&gt;crate&lt;/span&gt;&lt;span class="p"&gt;::{&lt;/span&gt;&lt;span class="n"&gt;Contract&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ContractClient&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;soroban_sdk&lt;/span&gt;&lt;span class="p"&gt;::{&lt;/span&gt;&lt;span class="n"&gt;Env&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nd"&gt;#[test]&lt;/span&gt;
&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Env&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;default&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;contract_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="nf"&gt;.register_contract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Contract&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;ContractClient&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;contract_id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="nf"&gt;.run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nn"&gt;Option&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nb"&gt;None&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally feel free to run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo &lt;span class="nb"&gt;test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or if you're using &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;VSCode&lt;/a&gt; and have &lt;a href="https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer" rel="noopener noreferrer"&gt;Rust Analyzer&lt;/a&gt; installed you can just run the tests inline right in the code editor itself!&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3y1olc2jygm8grkvc1i8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3y1olc2jygm8grkvc1i8.png" alt="Run tests inline via Rust Analyzer" width="169" height="75"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 3: &lt;strong&gt;Deploy your contract to the &lt;code&gt;Futurenet&lt;/code&gt; via the Soroban CLI&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Once you've completed constructing your contract you need to deploy it to the &lt;code&gt;Futurenet&lt;/code&gt;. We can accomplish this via the Soroban CLI. Before we can do that we need to build our contract and compile it to the WASM format that the Soroban VM expects. To do that simply run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo build &lt;span class="nt"&gt;--target&lt;/span&gt; wasm32-unknown-unknown &lt;span class="nt"&gt;--release&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will build and place your contract inside the &lt;code&gt;./target/wasm32-unknown-unknown/release/&lt;/code&gt; directory of your project. From here you can deploy the &lt;code&gt;.wasm&lt;/code&gt; file of your contract to the Soroban &lt;code&gt;Futurenet&lt;/code&gt; like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;soroban contract deploy &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--wasm&lt;/span&gt; target/wasm32-unknown-unknown/release/hello_world.wasm &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--rpc-url&lt;/span&gt; https://futurenet.rpciege.com:443 &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--network-passphrase&lt;/span&gt; &lt;span class="s2"&gt;"Test SDF Future Network ; October 2022"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If all goes according to plan you should receive an output of the freshly deployed contract id. This was mine: &lt;code&gt;34447d1457fd860d5faec2434c1b6087fa3a7420655593866190b594b1136989&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This is a bit of a messy command though and the Soroban CLI includes a pretty nifty feature which will speed up deploying and invoking contracts in the future via the &lt;code&gt;config&lt;/code&gt; command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;soroban config &lt;span class="nt"&gt;-h&lt;/span&gt;
Read and update config

Usage: soroban config &amp;lt;COMMAND&amp;gt;

Commands:
  identity  Configure different identities to sign transactions
  network   Configure different networks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's go ahead and configure both a network and an identity for future use so we don't have to use the &lt;code&gt;--rpc-url&lt;/code&gt; and &lt;code&gt;--network-passphrase&lt;/code&gt; and we aren't borrowing the default Soroban &lt;code&gt;--source&lt;/code&gt; which could result in sequence number conflicts if someone else were to also be executing a command with this default &lt;code&gt;Address&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;soroban config identity generate Default &lt;span class="nt"&gt;--global&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next we need to ensure this address is funded so it can be used as a fee source for all our &lt;code&gt;soroban&lt;/code&gt; commands. To do this first we need to get the public address of our newly generated &lt;code&gt;Default&lt;/code&gt; keypair.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;soroban config identity address Default
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Mine was &lt;code&gt;GBCXL3JLGJ6V2LFWKX5VZ2D42E65MVLX5LTAAN6H7C57J5US7JNCDOSB&lt;/code&gt;. Finally then we can fund this new account on the &lt;code&gt;Futurenet&lt;/code&gt; via our &lt;code&gt;Friendbot&lt;/code&gt; faucet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-I&lt;/span&gt; &lt;span class="nt"&gt;-X&lt;/span&gt; GET &lt;span class="s2"&gt;"https://friendbot-futurenet.stellar.org/?addr=GBCXL3JLGJ6V2LFWKX5VZ2D42E65MVLX5LTAAN6H7C57J5US7JNCDOSB"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With any luck you should get a successful &lt;code&gt;200&lt;/code&gt; response.&lt;/p&gt;

&lt;p&gt;With a new identity added and funded we're ready to add our &lt;code&gt;Futurenet&lt;/code&gt; network shortcut.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;soroban config network add Futurenet &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--global&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--rpc-url&lt;/span&gt; https://futurenet.rpciege.com:443 &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--network-passphrase&lt;/span&gt; &lt;span class="s2"&gt;"Test SDF Future Network ; October 2022"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sweet! Now the command from above can be shortened to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;soroban contract deploy &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--wasm&lt;/span&gt; target/wasm32-unknown-unknown/release/hello_world.wasm &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--source&lt;/span&gt; Default &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--network&lt;/span&gt; Futurenet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pretty clean eh?&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: &lt;strong&gt;Invoke your contract&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Now that our contract has been deployed to the &lt;code&gt;Futurenet&lt;/code&gt; it's time to invoke it and win the skirmish!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;soroban contract invoke &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--id&lt;/span&gt; &amp;lt;contract-id-from-above&amp;gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--source&lt;/span&gt; Default &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--network&lt;/span&gt; Futurenet &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--&lt;/span&gt; run &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--_nft_dest&lt;/span&gt; &amp;lt;stellar-mainnet-public-key&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;contract-id-from-above&amp;gt;&lt;/code&gt; will be the contract id from your previous contract deployment in the prior step. e.g. remember mine was &lt;code&gt;34447...36989&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;stellar-mainnet-public-key&amp;gt;&lt;/code&gt; should be your own mainnet Stellar public key where you’d like to receive your pack of
commemorative NFT cards. e.g. Mine is &lt;a href="https://stellar.expert/explorer/public/account/GDAYVCINVNUZ57EOCN4FK2VVWGQ3L3NW37L6UJLZCK3C7S7CNSS5EHHG" rel="noopener noreferrer"&gt;&lt;code&gt;GDAYV...5EHHG&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 5: &lt;strong&gt;Claim your pack of digital collectible cards&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The final step to collect your rewards is to navigate to &lt;a href="https://rpciege.com/claim" rel="noopener noreferrer"&gt;https://rpciege.com/claim&lt;/a&gt; and login with your &lt;code&gt;&amp;lt;stellar-mainnet-public-key&amp;gt;&lt;/code&gt; account in order to claim your digital collectible card pack for this skirmish.&lt;/p&gt;

&lt;p&gt;Congratulations! You've completed the first game, from here on out it'll only get more fun and fantastic!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>rust</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
    <item>
      <title>RPCiege: Setup</title>
      <dc:creator>Tyler van der Hoeven</dc:creator>
      <pubDate>Tue, 27 Jun 2023 19:28:39 +0000</pubDate>
      <link>https://dev.to/stellar/rpciege-setup-3d1g</link>
      <guid>https://dev.to/stellar/rpciege-setup-3d1g</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Earn digital collectible playing cards in &lt;a href="https://rpciege.com/" rel="noopener noreferrer"&gt;RPCiege&lt;/a&gt;, a smart contract coding game teaching the fundamentals of developing and deploying performant and secure blockchain applications though small, fun, code puzzles.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Before we begin the siege of the RPC we need to ensure our system is configured for building Soroban smart contracts. You have two clear options. The first is to use a virtual environment like &lt;a href="https://www.gitpod.io/" rel="noopener noreferrer"&gt;Gitpod&lt;/a&gt; or &lt;a href="https://github.com/features/codespaces" rel="noopener noreferrer"&gt;Codespaces&lt;/a&gt; which can have everything pre-installed and configured for you. In fact here's a good &lt;code&gt;hello-world&lt;/code&gt; Gitpod VM we've built for you.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gitpod.io/#https://github.com/stellar/soroban-examples" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgitpod.io%2Fbutton%2Fopen-in-gitpod.svg" alt="Open in Gitpod" width="160" height="45"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The second option is to setup your own local machine to develop Rust Soroban smart contracts. Personally that's my recommendation as everything will be faster and cheaper but if you're just getting started and still evaluating your interest the Gitpod can be great way to get off the ground quickly and painlessly. Here's the instructions for how to do that.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;small&gt;Instructions sniped from &lt;a href="https://soroban.stellar.org/docs/getting-started/setup" rel="noopener noreferrer"&gt;https://soroban.stellar.org/docs/getting-started/setup&lt;/a&gt;&lt;/small&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Soroban contracts are small programs written in the &lt;a href="https://www.rust-lang.org/" rel="noopener noreferrer"&gt;Rust&lt;/a&gt; programming language.&lt;/p&gt;

&lt;p&gt;To build and develop contracts you need only a couple prerequisites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;a href="https://www.rust-lang.org/" rel="noopener noreferrer"&gt;Rust&lt;/a&gt; toolchain&lt;/li&gt;
&lt;li&gt;An editor that supports Rust&lt;/li&gt;
&lt;li&gt;&lt;a href="https://soroban.stellar.org/docs/reference/soroban-cli" rel="noopener noreferrer"&gt;Soroban CLI&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Install Rust
&lt;/h2&gt;

&lt;p&gt;If you use macOS, Linux, or another Unix-like OS, the simplest method to install&lt;br&gt;
a Rust toolchain is to install &lt;code&gt;rustup&lt;/code&gt;. Install &lt;code&gt;rustup&lt;/code&gt; with the following&lt;br&gt;
command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;--proto&lt;/span&gt; &lt;span class="s1"&gt;'=https'&lt;/span&gt; &lt;span class="nt"&gt;--tlsv1&lt;/span&gt;.2 &lt;span class="nt"&gt;-sSf&lt;/span&gt; https://sh.rustup.rs | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you use Windows, or need an alternative method of installing Rust, check out: &lt;a href="https://www.rust-lang.org/tools/install" rel="noopener noreferrer"&gt;https://www.rust-lang.org/tools/install&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Install the target
&lt;/h2&gt;

&lt;p&gt;Install the &lt;code&gt;wasm32-unknown-unknown&lt;/code&gt; target.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rustup target add wasm32-unknown-unknown
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Configure an Editor
&lt;/h2&gt;

&lt;p&gt;Many editors have support for Rust. Visit the following link to find out how to&lt;br&gt;
configure your editor:&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.rust-lang.org/tools" rel="noopener noreferrer"&gt;https://www.rust-lang.org/tools&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A popular editor is Visual Studio Code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://code.visualstudio.com" rel="noopener noreferrer"&gt;Visual Studio Code&lt;/a&gt; editor.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer" rel="noopener noreferrer"&gt;Rust Analyzer&lt;/a&gt; for Rust language support.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb" rel="noopener noreferrer"&gt;CodeLLDB&lt;/a&gt; for step-through-debugging.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Install the Soroban CLI
&lt;/h2&gt;

&lt;p&gt;The Soroban CLI can execute Soroban contracts in the same environment the&lt;br&gt;
contract will execute on network, however in a local sandbox.&lt;/p&gt;

&lt;p&gt;Install the Soroban CLI using &lt;code&gt;cargo install&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Note depending on when you read this&lt;/span&gt;
&lt;span class="c"&gt;# 0.8.0 may not be the most recent version&lt;/span&gt;
cargo &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--locked&lt;/span&gt; &lt;span class="nt"&gt;--version&lt;/span&gt; 0.8.0 soroban-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Usage
&lt;/h3&gt;

&lt;p&gt;Run the &lt;code&gt;soroban&lt;/code&gt; command and you should see output like below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;% soroban
Build, deploy, &amp;amp; interact with contracts&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nb"&gt;set &lt;/span&gt;identities to sign with&lt;span class="p"&gt;;&lt;/span&gt; configure networks&lt;span class="p"&gt;;&lt;/span&gt; generate keys&lt;span class="p"&gt;;&lt;/span&gt; and more.

Intro: https://soroban.stellar.org
CLI Reference: https://github.com/stellar/soroban-tools/tree/main/docs/soroban-cli-full-docs.md

Usage: soroban &lt;span class="o"&gt;[&lt;/span&gt;OPTIONS] &amp;lt;COMMAND&amp;gt;

Commands:
  contract    Tools &lt;span class="k"&gt;for &lt;/span&gt;smart contract developers
  config      Read and update config
  events      Watch the network &lt;span class="k"&gt;for &lt;/span&gt;contract events
  lab         Experiment with early features and expert tools
  version     Print version information
  completion  Print shell completion code &lt;span class="k"&gt;for &lt;/span&gt;the specified shell

Options:
      &lt;span class="nt"&gt;--global&lt;/span&gt;                     Use global config
  &lt;span class="nt"&gt;-f&lt;/span&gt;, &lt;span class="nt"&gt;--filter-logs&lt;/span&gt; &amp;lt;FILTER_LOGS&amp;gt;  Filter logs output. To turn on &lt;span class="s2"&gt;"soroban_cli::log::footprint=debug"&lt;/span&gt; or off &lt;span class="s2"&gt;"=off"&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt; Can also use &lt;span class="nb"&gt;env &lt;/span&gt;var &lt;span class="sb"&gt;`&lt;/span&gt;RUST_LOG&lt;span class="sb"&gt;`&lt;/span&gt;
  &lt;span class="nt"&gt;-q&lt;/span&gt;, &lt;span class="nt"&gt;--quiet&lt;/span&gt;                      Do not write logs to stderr including &lt;span class="sb"&gt;`&lt;/span&gt;INFO&lt;span class="sb"&gt;`&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt;, &lt;span class="nt"&gt;--verbose&lt;/span&gt;                    Log DEBUG events
      &lt;span class="nt"&gt;--very-verbose&lt;/span&gt;               Log DEBUG and TRACE events
      &lt;span class="nt"&gt;--list&lt;/span&gt;                       List installed plugins. E.g. &lt;span class="sb"&gt;`&lt;/span&gt;soroban-hello&lt;span class="sb"&gt;`&lt;/span&gt;
  &lt;span class="nt"&gt;-h&lt;/span&gt;, &lt;span class="nt"&gt;--help&lt;/span&gt;                       Print &lt;span class="nb"&gt;help&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;see more with &lt;span class="s1"&gt;'--help'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
  &lt;span class="nt"&gt;-V&lt;/span&gt;, &lt;span class="nt"&gt;--version&lt;/span&gt;                    Print version

TESTING_OPTIONS:
      &lt;span class="nt"&gt;--config-dir&lt;/span&gt; &amp;lt;CONFIG_DIR&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great! Now that you're hopefully all setup you're ready to begin skirmishing! Proceed to &lt;a href="https://rpciege.com/booklet" rel="noopener noreferrer"&gt;The Booklet™&lt;/a&gt; and let the gaming begin!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>rust</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
