Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index SafeSetup event of Gnosis Safe 1.3.0 to retrieve initial owner #44

Closed
1 task done
adzialocha opened this issue May 4, 2021 · 3 comments
Closed
1 task done
Assignees

Comments

@adzialocha
Copy link
Contributor

adzialocha commented May 4, 2021

Tasks:

Notes:

This will give us compatibility with all Gnosis Safes deployed from version 1.3.0 on. Note that original Safes (aka not our forked one) will still not be supported between versions 1.0.0 - 1.3.0. This issue tries to tackle this: #59

@adzialocha adzialocha changed the title The subgraph should also index original Gnosis Safe contracts Index SetupEvent of Gnosis Safe 1.3.0 to retrieve initial owner Jan 21, 2022
@adzialocha adzialocha changed the title Index SetupEvent of Gnosis Safe 1.3.0 to retrieve initial owner Index SafeSetup event of Gnosis Safe 1.3.0 to retrieve initial owner Jan 21, 2022
@JacqueGM JacqueGM self-assigned this Aug 14, 2022
@llunaCreixent
Copy link
Member

Context:

In order to index the owner of a Safe when it's deployed, we created a fork of the 5afe/safe-contracts v 1.1.1 and introduced the emission of a AddedOwner event in the setupOwners() function of the OwnerManager contract.
In the version 1.3.0 of the 5afe/safe-contracts, the aforementioned event doesn't exist (see https://github.com/safe-global/safe-contracts/blob/main/contracts/base/OwnerManager.sol#L22), but instead an event with the same purpose has been added in the etup()funcion of theGnosisSafe` contract (see SafeSetup event in https://github.com/safe-global/safe-contracts/blob/main/contracts/GnosisSafe.sol#L96).

Since we want the subgraph to index the data coming from both Safe versions we need to add a handler for the SafeSetup event.

@llunaCreixent
Copy link
Member

llunaCreixent commented Nov 4, 2022

The only drawback with this approach is that we are registering all the Safes, and not only the ones that signed up to the Hub.
We should re consider if we want to index only the Safes that are signed up to the Hub. We could do it by checking if the Safe is signed up every time we create a new Safe entry in the subgraph database.

@llunaCreixent
Copy link
Member

Created a new issue: #85

@JacqueGM JacqueGM mentioned this issue Nov 22, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants