-
Notifications
You must be signed in to change notification settings - Fork 36
DAOTracker Support #380
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
DAOTracker Support #380
Conversation
@orenyodfat tests are passing. Also I believe I've resolved all comments, please verify. |
@orenyodfat the new DAOTracker contract that contains the arcVersion is integrated. Here's an overview of the new changes:
Open question:
|
let avatar = event.params._avatar; | ||
let controller = event.params._controller; | ||
let reputation = event.params._reputation; | ||
let daoToken = event.params._daoToken; | ||
let sender = event.params._sender; | ||
let arcVersion = event.params._arcVersion; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these local vars are redundant here.
arcVersion = daoCreatorInfo.version; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to confirm (somehow) that creating a template for wrong contract does not crash the subgraph .
this can happened only if the event does not come from daocreator.
if we cannot confirm ,so lets consider limit this feature only for daocreator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The subgraph does not (as far as I know, looking into this) check to make sure the contract bytecode matches the bytecode in the ABI file. This means that it only watches for events ABIs from a given contract address, and if they do not emit from that address the subgraph will not do anything.
So in the case you're describing, the subgraph would not crash when it creates the template, it would rather just do nothing from there on out. The only case where this could happen is someone wrote custom contracts that emit the events we're looking for, and the subgraph responds to those events from these newly created contracts. The plan here, is that if DAOstack detects a "DAO" is doing this, it would blacklist it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Writing a test to verify the subgraph doesn't crash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as far as I see the only way to mitigate that and stay on the safe side is to track this event only if it come via daocreator. otherwise ignore it.
this can happened only when the event does not come from daocreator. right ? lets consider supporting this feature only if it come from daocreator. |
@orenyodfat yes this only happens when it comes not from the DAOcreator. I agree that we could limit this to just the DAOcreator for now, and the work done here would still be reusable for when the factories are created. |
@orenyodfat The only DAOs that will be tracked are ones created by the DaoCreator. Additionally the embedded blacklist is implemented in the |
No description provided.