1

I am trying to build a muiltsig address using shelley simple scripts (https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/simple-scripts.md)

The purpose of this scheme is to have a regular 2-of-2 multisig address backed by a third emergency key that is only valid after a certain slot number.

Here is my script syntax in json form:

{
  "type": "any",
  "scripts":
  [
    {
      "type": "all",
      "scripts":
      [
        {
          "type": "sig",
          "KeyHash": "0d4db33028a10e797670509faf8f8d0d42e35c1d6e78cb5d78403f2d"
        },
        {
          "type": "sig",
          "KeyHash": "69ad5d0ba81fbb859d613b776564596de660d88d032a923347646663"
        }
      ]
    },
    {
      "type": "all",
      "scripts":
      [
        {
          "type": "after",
          "slot": "40250000"
        },
        {
          "type": "sig",
          "KeyHash": "4b263032e57de4cd8a385bc19dbd12ed54499c7d1d483134e616e2dc"
        }
      ]
    }
  ]
}

However, when building the script address, I get the following error:

Command failed: address build  Error: multitest/multisig.json: Syntax error in script: Error in $: "atLeast" script value not found

Kindly explain what am I doing wrong?

2 Answers 2

1

You have a two errors:

  1. Your slot number should be an integer
  2. Key word keyHash should have k in lowercase

Using below version, it works.

{
  "type": "any",
  "scripts":
  [
    {
      "type": "all",
      "scripts":
      [
        {
          "type": "sig",
          "keyHash": "0d4db33028a10e797670509faf8f8d0d42e35c1d6e78cb5d78403f2d"
        },
        {
          "type": "sig",
          "keyHash": "69ad5d0ba81fbb859d613b776564596de660d88d032a923347646663"
        }
      ]
    },
    {
      "type": "all",
      "scripts":
      [
        {
          "type": "after",
          "slot": 40250000
        },
        {
          "type": "sig",
          "keyHash": "4b263032e57de4cd8a385bc19dbd12ed54499c7d1d483134e616e2dc"
        }
      ]
    }
  ]
}
0

At first glance, it might be few issues, as the cardano-cli errors tend to be ambiguous.

  • Your slot number is specified as a string, while it should be an intiger.
  • You might need to specify also before slot
  • You might be signing the with the wrong key
1
  • Out of those three points, only the first applies to actually building the script address from the JSON script file, which is what I'm having issues with. I've changed the slot number to an integer value and I'm still getting the same error: [Command failed: address build Error: multisig.json: Syntax error in script: Error in $: "atLeast" script value not found] Really weird... have I discovered a bug?
    – zhekson
    Oct 20, 2021 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.