Summary
This issue documents a design question about the attribute in SPEL instructions.
Current Design
The attribute is required to indicate that an account should be claimed (transferred from to the program) rather than updated (already owned by the program).
Current Usage
| Pattern |
Generated Code |
LEZ Validation |
|
|
PDA derivation must match |
|
|
must be true |
| (no init) |
|
|
Questions
-
Is without or valid?
- Currently generates without signer authorization
- LEZ v0.2.0-rc1 requires for
- This would fail validation unless account has
-
Could we make implicit?
Alternative approach: Runtime check
Pros:
- Less boilerplate in instruction definitions
- Can't forget to add
Cons:
- Implicit behavior might hide logic errors
- Harder to debug when expectations are wrong
- Runtime validation happens later (post-compile)
-
Should we require + ( OR )?
- alone seems invalid (can't claim without PDA or authorization)
- Macro could enforce this at compile time
Related
Next Steps
Discussion needed on whether to:
- Keep current explicit design
- Make implicit (runtime detection)
- Enforce requires or at compile time
/cc @vpavlin
Summary
This issue documents a design question about the attribute in SPEL instructions.
Current Design
The attribute is required to indicate that an account should be claimed (transferred from to the program) rather than updated (already owned by the program).
Current Usage
Questions
Is without or valid?
Could we make implicit?
Alternative approach: Runtime check
Pros:
Cons:
Should we require + ( OR )?
Related
Next Steps
Discussion needed on whether to:
/cc @vpavlin