<p>Just make sure your <code>keyHash</code> is correctly generated.</p>
<pre><code>cardano-cli address key-hash --payment-verification-key-file policy.vkey
</code></pre>
<p>I tried your script with correct values and it's working.</p>

CC BY-SA 4.0
2022-01-16T08:59:22.877Z
Found the error. I had put the slot as a string instead of integer.
LKBH Pools
CC BY-SA 4.0
2022-01-16T15:41:01.210Z
Great, in you script supposedly it was an integer because I didn't see any quotes.
georgeos
CC BY-SA 4.0
2022-01-16T06:30:30.367Z
2022-01-16T06:30:30.367Z
georgeos
<p>I want to ensure a fixed supply of a native asset and this can be ensured by time locking of the policy id using the policy.script below:</p>
<pre><code>    {
  &quot;type&quot;: &quot;all&quot;,
  &quot;scripts&quot;:
  [
    {
      &quot;type&quot;: &quot;before&quot;,
      &quot;slot&quot;: &lt;insert slot here&gt;
    },
    {
      &quot;type&quot;: &quot;sig&quot;,
      &quot;keyHash&quot;: &quot;insert keyHash here&quot;
    }
  ]
}
</code></pre>
<p>The above format is created and run. Following error is shown</p>
<pre><code>Syntax error in script: Error in $: &quot;atLeast&quot; script value not found
</code></pre>
<p>when the following command is run:</p>
<pre><code>cardano-cli transaction policyid --script-file policy.script
</code></pre>
<p>Does anyone have a clue what is going wrong ? thanks.</p>

<mainnet>
time locking policy script native asset
# time locking policy script native asset

(Asked by: username_0 on 2022-01-16)

I want to ensure a fixed supply of a native asset and this can be ensured by time locking of the policy id using the policy.script below:
    {
  "type": "all",
  "scripts":
  [
    {
      "type": "before",
      "slot": 
    },
    {
      "type": "sig",
      "keyHash": "insert keyHash here"
    }
  ]
}

The above format is created and run. Following error is shown
Syntax error in script: Error in $: "atLeast" script value not found

when the following command is run:
cardano-cli transaction policyid --script-file policy.script

Does anyone have a clue what is going wrong ? thanks.

**Tags:** mainnet

---

## 1 answers

### Answer by username_1 on 2022-01-16. Score: 1

Just make sure your keyHash is correctly generated.
cardano-cli address key-hash --payment-verification-key-file policy.vkey

I tried your script with correct values and it's working.

> **Comments:**
> **username_0**: Found the error. I had put the slot as a string instead of integer.  
> **username_1**: Great, in you script supposedly it was an integer because I didn't see any quotes.  

---

