erc6900 / resources

18 stars 4 forks source link

[Improvement] Multiple validation function support #4

Closed adam-alchemy closed 6 days ago

adam-alchemy commented 7 months ago

(As discussed in Community Call 1)

fangting-alchemy commented 6 months ago

Multiple validation function support would add great flexibility to accounts. Based on the current standard and development in Account Abstraction, it is worth consider the following:

A feasible solution might be:

jaypaik commented 6 months ago

Great thoughts!

  • A default validation function concept is also very interesting and can be quite useful given the above point being true. It can greatly simplify the common and simple use case where clients don't need to even be aware of the available validation functions.

This is interesting and probably worth exploring further. If the scope grows we can move this bit to a separate issue.

  • userOp.signature selects the validation function (empty bytes means default validation function) of an execution function. A rule can be enforced on the last x bytes if a signature is reserved for this.

The runtime path doesn't have access to a signature, so it may be worth exploring the calldata wrapper approach, which is available both to user ops and runtime calls.

fangting-alchemy commented 6 months ago

The runtime path doesn't have access to a signature, so it may be worth exploring the calldata wrapper approach, which is available both to user ops and runtime calls.

Good point. Agree, in that case, userOp.calldata can be the house for the selection.

adamegyed commented 6 days ago

Closing as completed in https://github.com/erc6900/reference-implementation/pull/62.