Have any idea how to edit the predicate?

When changing any data in the configurables, the bytes of the predicate are altered, and consequently, the address as well. For my use case, I need a specific account added to the predicate to be removed while maintaining the same predicate address.

Is there any way to do this natively? If not, any other solution for linking the old predicate to the new one?

3 Likes

Are you saying that the predicate needs to be updated at run-time? Like an address needs to be changed after deploying?

Predicates are immutable, so there’s no way to actually change the code inside the predicate. If you need some mutable state, there’s some tricks you can do with UTXOs, I can share more details if that’s helpful, but that also requires a smart contract to be involved.

4 Likes

Please note that the predicate code is hashed in order to get the address. Changing the code changes the address.

This is it! We have some tricks like storing data in an nft and transfering that nft to the predicate

2 Likes

Thank you for the response!

One of the alternatives I considered was linking the predicate’s address to an NS service. What do you think about that?

Regarding the contract, how do you envision this solution? What information would be stored in this contract?

1 Like

Hi there!
Regarding the NS approach, I would need more information about your architecture to understand what you are trying to solve.

Then, I don’t really know what you mean with the contract question. Can I have more context please?

Thank you so much.