pact
pact copied to clipboard
Suggestion: Sugar syntax of (define-keyset ) should be deprecated
Currently, Pact allows to use this sugar syntax:
(define-keyset `xxxx)
which is internally translated to:
(define-keyset 'xxxx (read-keyset 'xxxx))
IMHO, this should be removed or at least deprecated. Because this shortcut does not provide any functionality just confusion.
Think that for many people the differences between (read-keyset)
, (define-keyset)
and (enforce-keyset)
are not clear and confusing, and are source of many security issues.
Allowing to use the sugar syntax just makes things even harder to understand.
Thank you for the report, @CryptoPascal31, Pact team will discuss.
Following the same philosophy, some other old keyset's related confusing syntax should be deprecated as well:
(enforce-guard "my-keyset")
Confusing because "my-keyset" is in fact not a guard. and strictly internally translated to :
(enforce-guard (keyset-ref-guard "my-keyset"))
Module keyset governance should be deprecated:
(module my-mod "my-keyset"
Devs can replace it efficiently with capability governance. And moreover keyset governance is confusing because handled differently than capability governance (strict evaluation at first deployment time)