safe-global / safe-modules

A collection of modules that can be used with the Safe contract

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebAuthn Signer Creation Should Emit an Event

nlordell opened this issue · comments

We should emit an event whenever a WebAuthn credential is created in order to be able to perform analytics for Passkey usage.

The event should look like:

event Created(address signer, uint256 x, uint256 y, P256.Verifiers verifiers);

Note that we should evaluate whether or not we want the signer address to be indexed or not. My intuition is "no".

@nlordell thanks for this. What are the implications of getting a signer parameter indexed?

(Peter from the data team)

What are the implications of getting a signer parameter indexed?

Using indexed keyword allows searching for events by filter (useful when searching events using libraries like web3.py, web3.js, etc.), Also, having indexed param would mean that etherum.logs table in Dune would have signer address available in topic1 column. If not marked as indexed, then singer address need to be decoded from data column.

https://docs.soliditylang.org/en/latest/contracts.html#events

Indexing is accompanied by additional gas cost. So, indexed is recommended only if necessary. As we use dune and parsing data column of etherum.logs would give signer address, I don't think indexing is needed.

Thanks for this! Yeah let's not do indexing.