KIP-0029: Proposal of new guard type: Constant boolean guard#58
KIP-0029: Proposal of new guard type: Constant boolean guard#58CryptoPascal31 wants to merge 1 commit into
Conversation
|
This seems extremely useful, I assume it would help with things like the function below. You can type specify bool, arrays, objects, strings, but not guards that I am aware of. So we end up having to add extra helper functions which serve no real purpose. (defun enforce-null:bool (defun create-null-guard:guard |
|
Apologies for the late reply on this one, but this one is achievable with userland code. (module m g (defcap g () true)
(defun enforce-bool (b:bool) (enforce b "boolean guard failed"))
(defun create-boolean-guard:guard (b:bool) (create-user-guard (enforce-bool b))) |
Yes of course it is. Plus, having an associated clean principal (as I propose) would improve a lot of transparency and security for non-technical users. Everybody should be able to identify quickly Burn / "Free to use" accounts. Because with a userland workaround, anybody who wants to verify what's going on:
I can give you an example:
Having a constant boolean guard, managed by Pact, would allow fulfilling such use-cases more easily and without any possible ambiguity. |
The idea is to propose a new guard, the most simple as possible, the easiest to understand.
But it's currently missing, and would be very useful, and would improve the clarity.
Nothing revolutionary.
https://github.com/CryptoPascal31/KIPs/blob/119fe2df7df6a42bba7f46c406ca631aec95e99a/kip-0029.md