Openzepellin UI Builder

Hello, I’m trying to use the OpenZepellin UI builder

When I load my contract I have to fill the Private State ID * but I don’t know what to put there, can anyone tell me?

Thanks

2 Likes

Can you share the repo?

1 Like

It could be any string identifier - it will be then used as a context for all private state

1 Like

Hey @armsves, thanks for trying out OpenZeppelin UI Builder!

The Private State ID is a user-defined, unique identifier that you choose yourself. It’s used to manage your personal, encrypted private state data for the contract.

What to put there:
You can use any unique string that makes sense for your use case. Common patterns include:

  • mycontract_v1
  • counter_v1
  • welcome_v1
  • bboardPrivateState
  • my-unique-state-id

Why it matters:
The Private State ID serves as a key in your local storage (LevelDB) where your encrypted private state is stored and retrieved.

However, I realized that this might not be a very useful input to have at all in the UI Builder, so I’ve created an issue to remove it and replace it with an internal auto-generation: feat(adapter-midnight): Auto-generate Private State ID for improved UX · Issue #263 · OpenZeppelin/ui-builder · GitHub

Once it’s implemented, users won’t need to even think about this.

3 Likes