• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-modules / 9890531912
100%
master: 85%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 11 Jul 2024 11:25AM UTC
Jobs 1
Files 12
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Jul 2024 11:23AM UTC coverage: 100.0%. Remained the same
9890531912

push

github

web-flow
Add User Story for Computing Safe Address (#463)

This PR partially addresses the comment
https://github.com/safe-global/safe-modules/pull/456#discussion_r1666935429
(cc @mmv08).

In doing some exploration around event indexing, I found that we don't
really have a good developer story for it. There are two separate
passkey flows, so I will address them separately.

### Proxy + Factory Signer

The flow specific to using the `SafeWebAuthnSignerFactory` contract to
deploy a credential-specific WebAuthn credential owner requires a
service for indexing Safe owners in order to properly search Safes that
are owned by a specific credential. While the WebAuthn credential signer
address can be deterministically computed (see
`signerFactory.getSigner(...)` function), it does not allow for us to
search for all Safes that use this signer. This is because there are
multiple events that affect the `owners` list for a Safe (`Setup`,
`Owner*`), and specifically owners added during `setup` do not emit any
event indexed by owner address, meaning you would have to check all
`Setup` events for all Safes in order to determine which Safes use the
specific WebAuthn credential signer.

There is, however, support for this in the [transaction service
API](https://docs.safe.global/core-api/transaction-service-reference#Owners).
So, right now, it should be possible to find all Safes owned by a
WebAuthn credential by implementing something like:

```ts
const signerAddress = await signerFactory.getSigner(x, y, verifiers);
const safes = await safeTransactionServiceClient.getOwnerSafes(signerAddress);
```

However, this requires an API service to do this, and cannot be done
alone with events.

### Shared Signer

The flow specific to using the `SafeWebAuthnSharedSigner` contract
suffers from the same issues as the other flow, in that finding Safes by
owner is not really possible with events. Compounding on top of this,
the transaction service A... (continued)

28 of 28 branches covered (100.0%)

Branch coverage included in aggregate %.

2 of 2 new or added lines in 1 file covered. (100.0%)

92 of 92 relevant lines covered (100.0%)

30.29 hits per line

Jobs
ID Job ID Ran Files Coverage
1 9890531912.1 11 Jul 2024 11:25AM UTC 12
100.0
GitHub Action Run
Source Files on build 9890531912
  • Tree
  • List 12
  • Changed 2
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • c3f6d36a on github
  • Prev Build on main (#9869500757)
  • Next Build on main (#9906147334)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc