You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
jtrein
changed the title
Get past adapter addresses from event logs
Get past adapter addresses from new "artifacts" adapter
Jul 8, 2021
jtrein
changed the title
Get past adapter addresses from new "artifacts" adapter
Get past adapter addresses using the "artifacts" adapter
Jul 8, 2021
jtrein
changed the title
Get past adapter addresses using the "artifacts" adapter
Get past adapter addresses using the "artifacts" util contract
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 eventsemit NewArtifact(_id, _owner, _version, _address, ArtifactType.ADAPTER)
, or maybeemit AdapterRemoved(adapterId)
andemit AdapterAdded(adapterId, adapterAddress, acl)
by theDaoRegistry
.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
The text was updated successfully, but these errors were encountered: