mirror of
https://github.com/Instadapp/instadapp-dsa-subgraph.git
synced 2024-07-29 21:48:18 +00:00
162 lines
3.1 KiB
GraphQL
162 lines
3.1 KiB
GraphQL
type User @entity {
|
|
id: ID!
|
|
|
|
"List of all the smart accounts currently owned by this user"
|
|
smartAccountsOwned: [SmartAccount!]! @derivedFrom(field:"owner")
|
|
|
|
"List of all the smart accounts created by this user"
|
|
smartAccountsCreated: [SmartAccount!]! @derivedFrom(field:"creator")
|
|
}
|
|
|
|
type SmartAccount @entity {
|
|
id: ID!
|
|
|
|
"Latest enabled owner"
|
|
owner: User
|
|
|
|
"Sender of the creation transaction"
|
|
creator: User
|
|
|
|
origin: String!
|
|
|
|
"Account module from which this account was created. It holds the connectors linked to this account."
|
|
accountModule: AccountModule
|
|
|
|
shield: Boolean
|
|
|
|
"Whether the owner is currently enabled to use this account or not"
|
|
isEnabled: Boolean!
|
|
|
|
"Casts made by this smart account"
|
|
casts: [Cast!]! @derivedFrom(field: "account")
|
|
|
|
"Events that ocurred within this account scope"
|
|
events: [SmartAccountEvent!]! @derivedFrom(field: "account")
|
|
}
|
|
|
|
type AccountModule @entity {
|
|
"ID is the account module version"
|
|
id: ID!
|
|
|
|
"Base address of the module"
|
|
address: String!
|
|
|
|
"InstaConnectors contract linked to this module. It holds a list of linked connectors as well as chief/admin information for that contract."
|
|
connectors: InstaConnector!
|
|
|
|
check: String
|
|
|
|
instaIndex: InstaIndex!
|
|
|
|
"List of all the accounts that used this module."
|
|
accountsCloned: [SmartAccount!]! @derivedFrom(field: "accountModule")
|
|
}
|
|
|
|
type InstaIndex @entity {
|
|
id: ID!
|
|
|
|
"Address of the current master"
|
|
master: String
|
|
|
|
accountModules: [AccountModule!]! @derivedFrom(field: "instaIndex")
|
|
}
|
|
|
|
type InstaConnector @entity {
|
|
"Address of the InstaConnector contract. This contract has a list of connectors tracked."
|
|
id: ID!
|
|
|
|
chiefs: [Chief!]! @derivedFrom(field: "instaConnector")
|
|
|
|
connectors: [Connector!]! @derivedFrom(field: "instaConnector")
|
|
}
|
|
|
|
type Connector @entity {
|
|
"Connector ID includes the ID of the InstaConnector it belongs to and the internal ID of the connector"
|
|
id: ID!
|
|
|
|
"Whether this connector is a Static Connector or not."
|
|
isStatic: Boolean!
|
|
|
|
"Whether this Connector is enabled or not."
|
|
isEnabled: Boolean!
|
|
|
|
"InstaConnectors contract where this Connector is linked"
|
|
instaConnector: InstaConnector!
|
|
|
|
"Connector name"
|
|
name: String!
|
|
|
|
"Connector ID within the InstaConnectors contract"
|
|
connectorID: BigInt!
|
|
|
|
"Connector type."
|
|
connectorType: BigInt!
|
|
|
|
"Address for said connector"
|
|
address: String!
|
|
}
|
|
|
|
type Chief @entity {
|
|
id: ID!
|
|
|
|
isActive: Boolean!
|
|
|
|
instaConnector: InstaConnector!
|
|
}
|
|
|
|
type Cast @entity {
|
|
id: ID!
|
|
|
|
"Account that triggered the cast"
|
|
account: SmartAccount!
|
|
|
|
origin: String!
|
|
|
|
sender: String!
|
|
|
|
value: BigInt!
|
|
}
|
|
|
|
interface SmartAccountEvent {
|
|
id: ID!
|
|
|
|
"Account scope of the event"
|
|
account: SmartAccount!
|
|
}
|
|
|
|
type CastEvent implements SmartAccountEvent @entity {
|
|
id: ID!
|
|
|
|
account: SmartAccount!
|
|
|
|
origin: String!
|
|
|
|
sender: String!
|
|
|
|
value: BigInt!
|
|
}
|
|
|
|
type DisableEvent implements SmartAccountEvent @entity {
|
|
id: ID!
|
|
|
|
account: SmartAccount!
|
|
|
|
user: User!
|
|
}
|
|
|
|
type EnableEvent implements SmartAccountEvent @entity {
|
|
id: ID!
|
|
|
|
account: SmartAccount!
|
|
|
|
user: User!
|
|
}
|
|
|
|
type SwitchShieldEvent implements SmartAccountEvent @entity {
|
|
id: ID!
|
|
|
|
account: SmartAccount!
|
|
|
|
shield: Boolean!
|
|
}
|