You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This may require a schema change for caveat enforcers which allow them to accept tx-contextual additional information from the caller, to provide things like additional delegations enabling withdrawing a payment, for example.
The text was updated successfully, but these errors were encountered:
danfinlay
added
the
schema-change
A change that will result in changing the types of the library, & so nneeding new tooling & docs.
label
Mar 27, 2023
Ok I'm starting to think the "paid caveats" goal is not worth optimizing for in v2. Reasons:
Not compatible with 4337
Can be approximated (with a small extra gas cost) by batching transfers to the caveat enforcer before the paid operation (probably to a method that identifies what it's for). Will incur a 5k gas cost for having written state if it cleans it up, but that's not huge.
Final thought - certainly possible (I did it) but it needs significant code and schema changes to avoid stack too deep errors in DelegatableCore and DelegatableRelayCore
Security is an issue - I made the paid caveat enforcer only callable from the specific contract to avoid an attacker calling the enforcer and stealing funds between a user making an allowance and using it.
A user might want to charge for using a permission they have, and this should be supported.
Examples:
This may require a schema change for caveat enforcers which allow them to accept tx-contextual additional information from the caller, to provide things like additional delegations enabling withdrawing a payment, for example.
The text was updated successfully, but these errors were encountered: