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

Get past adapter addresses using the "artifacts" util contract #418

Open
jtrein opened this issue Jul 8, 2021 · 0 comments
Open

Get past adapter addresses using the "artifacts" util contract #418

jtrein opened this issue Jul 8, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jtrein
Copy link
Member

jtrein commented Jul 8, 2021

Primary method

Use the new DaoArtifacts.sol to get the past adapter addresses.

Using Web3 (getPastEvents) or Ethers (queryFilter), we should be able to get the past emitted events of an adapter via the events emit NewArtifact(_id, _owner, _version, _address, ArtifactType.ADAPTER), or maybe emit AdapterRemoved(adapterId) and emit AdapterAdded(adapterId, adapterAddress, acl) by the DaoRegistry.

Use case

This will allow us to get proposal data from a DAO's previous adapter(s) (e.g. the DAO's off-chain voting adapter was upgraded). E.g. We want to list all NFT proposals, but if the adapter address has been changed, we need to get the previous ones, as well, to get complete data.

Related: https://github.com/openlawteam/tribute-contracts/issues/337

@jtrein jtrein added the enhancement New feature or request label Jul 8, 2021
@jtrein jtrein self-assigned this Jul 8, 2021
@jtrein jtrein changed the title Get past adapter addresses from event logs Get past adapter addresses from new "artifacts" adapter Jul 8, 2021
@jtrein jtrein changed the title Get past adapter addresses from new "artifacts" adapter Get past adapter addresses using the "artifacts" adapter Jul 8, 2021
@jtrein jtrein changed the title Get past adapter addresses using the "artifacts" adapter Get past adapter addresses using the "artifacts" util contract Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant