Open Gerard097 opened 1 year ago
Made one comment.
Also kinda wondering why tokens aren't in a document, so there could be an edge dao_id -> TOKEN_EDGE_NAME -> TokenDoc (pegToken, rewardToken) ... then we would not need an extra table?
Maybe too much for this PR but wondering why token info is in a separate table.
Made one comment.
Also kinda wondering why tokens aren't in a document, so there could be an edge dao_id -> TOKEN_EDGE_NAME -> TokenDoc (pegToken, rewardToken) ... then we would not need an extra table?
Maybe too much for this PR but wondering why token info is in a separate table.
In a sense, we already do this as we store the tokens in the DAO's settings document i.e. dao_id -> settings -> SettingsDoc (reward_token, peg_token). The actual issue is that for transfer action we don't know the DAO ID in advance, and we need to do the lookup by the Token symbol. We could iterate over all the settings documents and search for the one that matches the token but that would be very inefficient and could lead to more timeouts
@n13
I see yeah because we don't get any info from the transfer listener other than the symbol... so we need to look up the symbol either way...
assigntokdao
to specify which token is assigned (peg | reward)