-
Notifications
You must be signed in to change notification settings - Fork 16
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
Create SubQuery indexer for multisig accounts #1705
Comments
# An account can be a multisig, or a normal account (like a signatory)
type Account @entity {
id: ID!
address: String!
# if this account is the signatory on one or many multisigs, this will link to an array of multisigs
multisigs: [AccountMultisig] @derivedFrom(field: "signatory")
isMultisig: Boolean
# if this account is a multisig, this will link to an array of signatories
signatories: [AccountMultisig!] @derivedFrom(field: "multisig")
# this is only needed in the case of a multisig
threshold: Int
}
# entity for linking accounts and multisigs
type AccountMultisig @entity {
id: ID!
multisig: Account!
signatory: Account!
} Note that the schema for Multix is more complex than this, as we have pure proxies in there as well, and an Account can be a pure proxy, or it can be the proxied, see here https://github.com/ChainSafe/Multix/blob/main/squid/schema.graphql#L1-13 but I thought I'd start by keeping it simple. |
Separate projects: One project: In our situation I am personally more inclined towards single project since we don't really have big amount of data to index, both multisigs and proxies have very low number of events to index
|
@Tbaut Thanks for pointing to it. Seems that we're not going to scan every block with the indexer we can make a single indexer for proxies and multisig accounts. The SubQuery dictionary is used and it improves the indexing speed. Regarding nested multisigs, proxies. I don't think the recursive search should be implemented by SubQuery. We should use segregation of duty:
You can find the UML sequence diagram below. Here Nova Spektr is in charge of orchestration and choreography. @valentunn @tuul-wq FYI |
Addressed in novasamatech/subquery-proxy#6 |
For multisig account discover the multisig account indexer is required.
The approach should be the same as for Multix.
The subquery-proxy project may be used as a reference for the SubQuery indexer.
Questions about development may be addressed to @Asmadek.
Questions about deployment and testing may be addressed to @stepanLav
The text was updated successfully, but these errors were encountered: