title: UTXO Workshop: how to get Alice's sigscript?
body: <p>This might be a stupid question...</p>
  <p>I was playing around the <a href="https://www.youtube.com/watch?v=XuJmxMMHvDw&amp;lc=UgwFncXo12Z6ald8n2N4AaABAg" rel="nofollow noreferrer">utxo-workshop</a>, and there's a comment below asking on how to get alice's sigscript.</p>
  <p>I tried following the procedure in the test cases found in <a href="https://github.com/substrate-developer-hub/utxo-workshop/blob/master/runtime/src/utxo.rs#L431" rel="nofollow noreferrer"><code>utxo.rs</code></a>:</p>
  <pre class="lang-rust prettyprint-override"><code>let alice_signature = sp_io::crypto::sr25519_sign(SR25519, &amp;alice_pub_key, &amp;transaction.encode()).unwrap();
  transaction.inputs[0].sigscript = H512::from(alice_signature);
  </code></pre>
  <p>But it returns an error: <code>called `Option::unwrap()` on a `None` value</code>.</p>
  <p>I'm guessing the Transaction should look like this:</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;inputs&quot;: [
      {
        &quot;outpoint&quot;: &quot;0x76584168d10a20084082ed80ec71e2a783abbb8dd6eb9d4893b089228498e9ff&quot;,
        &quot;sigscript&quot;: &quot;0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000&quot;
      }
    ],
    &quot;outputs&quot;: [
      {
        &quot;value&quot;: 50,
        &quot;pubkey&quot;: &quot;0x8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48&quot;
      }
    ]
  }
  </code></pre>
  <p>How do I get the Alice Signature on a transaction where she spends 50 utxo on Bob:
  <code>0x6ceab99702c60b111c12c2867679c5555c00dcd4d6ab40efa01e3a65083bfb6c6f5c1ed3356d7141ec61894153b8ba7fb413bf1e990ed99ff6dee5da1b24fd83</code>?</p>
  <p>Or how can I do it in <a href="https://polkadot.js.org/apps/#/signing" rel="nofollow noreferrer">polkadot.js</a>?</p>