openlawteam/tribute-ui

Get past adapter addresses using the "artifacts" util contract

Opened this issue · 0 comments

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