<p>some actual code of the contract would help understand the issue better.</p>
<p>The error you describe suggests you are doing some checks for the script address (which is formed by payment credentials + optional staking credentials)</p>
<p>if you are checking for equality with an address built at contract runtime</p>
<p>(something like <code>PCredential.PScriptCredential({ valHash: ownHash })</code> in <code>plu-ts</code>)</p>
<p>then you are checking for the address to be strictly equal to the one without any stake credentials.</p>

CC BY-SA 4.0
2023-06-19T16:19:06.587Z
2023-06-19T16:19:06.587Z
Michele Nuzzi
<p>A simple way to generate such an address is by using Eternl.</p>
<ol>
<li>Go to <a href="https://eternl.io/" rel="nofollow noreferrer">https://eternl.io/</a></li>
<li>Open Settings (gear icon in the bottom left)</li>
<li>Open &quot;Franken Address Generator&quot;</li>
<li>Enter your script and stake address parts and generate</li>
</ol>
<p><a href="https://i.sstatic.net/DV8Mg.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DV8Mg.png" alt="enter image description here" /></a></p>
<p>Hope this helps. Otherwise please add an example of what you already tried and provide more details on the error you get.</p>

CC BY-SA 4.0
2023-06-19T06:14:36.390Z
2023-06-19T06:14:36.390Z
eddex
<p>I compiled my plutus script and generated a payment credential only address. The logic all working fine- no issues.</p>
<p>However when I add a stake credential to my plutus script address, the logic starts to fail. I have tried with PKH and Script hash staking credentials. Even tried using a stake credential created with an always succeeds withdrawal validator.</p>
<p>Anyone know whats going on?</p>

<plutus><staking>
Adding stake credential to script address
# Adding stake credential to script address

(Asked by: username_0 on 2023-06-18)

I compiled my plutus script and generated a payment credential only address. The logic all working fine- no issues.

However when I add a stake credential to my plutus script address, the logic starts to fail. I have tried with PKH and Script hash staking credentials. Even tried using a stake credential created with an always succeeds withdrawal validator.

Anyone know whats going on?

**Tags:** plutus, staking

---

## 2 answers

### Answer by username_1 on 2023-06-19. Score: 0

some actual code of the contract would help understand the issue better.

The error you describe suggests you are doing some checks for the script address (which is formed by payment credentials + optional staking credentials)

if you are checking for equality with an address built at contract runtime

(something like `PCredential.PScriptCredential({ valHash: ownHash })` in `plu-ts`)

then you are checking for the address to be strictly equal to the one without any stake credentials.


---

### Answer by username_2 on 2023-06-19. Score: -1

A simple way to generate such an address is by using Eternl.

1. Go to <https://eternl.io/>
2. Open Settings (gear icon in the bottom left)
3. Open "Franken Address Generator"
4. Enter your script and stake address parts and generate

[![enter image description here](https://i.sstatic.net/DV8Mg.png)](https://i.sstatic.net/DV8Mg.png)

Hope this helps. Otherwise please add an example of what you already tried and provide more details on the error you get.


---

