instadapp-dsa-subgraph/schema.graphql

162 lines
3.1 KiB
GraphQL
Raw Normal View History

type User @entity {
id: ID!
2020-05-28 14:50:54 +00:00
"List of all the smart accounts currently owned by this user"
smartAccountsOwned: [SmartAccount!]! @derivedFrom(field:"owner")
2020-05-28 14:50:54 +00:00
"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
2020-05-28 14:50:54 +00:00
"Sender of the creation transaction"
creator: User
origin: String!
2020-05-28 14:50:54 +00:00
"Account module from which this account was created. It holds the connectors linked to this account."
accountModule: AccountModule
shield: Boolean
2020-05-28 14:50:54 +00:00
"Whether the owner is currently enabled to use this account or not"
isEnabled: Boolean!
2020-05-28 14:50:54 +00:00
"Casts made by this smart account"
casts: [Cast!]! @derivedFrom(field: "account")
2020-05-28 14:50:54 +00:00
"Events that ocurred within this account scope"
events: [SmartAccountEvent!]! @derivedFrom(field: "account")
}
type AccountModule @entity {
"ID is the account module version"
id: ID!
2020-05-28 14:50:54 +00:00
"Base address of the module"
address: String!
2020-05-28 14:50:54 +00:00
"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!
2020-05-28 14:50:54 +00:00
"List of all the accounts that used this module."
accountsCloned: [SmartAccount!]! @derivedFrom(field: "accountModule")
}
type InstaIndex @entity {
id: ID!
2020-05-28 14:50:54 +00:00
"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!
2020-05-28 14:50:54 +00:00
"Whether this connector is a Static Connector or not."
isStatic: Boolean!
2020-05-28 14:50:54 +00:00
"Whether this Connector is enabled or not."
isEnabled: Boolean!
2020-05-28 14:50:54 +00:00
"InstaConnectors contract where this Connector is linked"
instaConnector: InstaConnector!
2020-05-28 14:50:54 +00:00
"Connector name"
name: String!
2020-05-28 14:50:54 +00:00
"Connector ID within the InstaConnectors contract"
connectorID: BigInt!
2020-05-28 14:50:54 +00:00
"Connector type."
connectorType: BigInt!
2020-05-28 14:50:54 +00:00
"Address for said connector"
address: String!
}
type Chief @entity {
id: ID!
isActive: Boolean!
instaConnector: InstaConnector!
}
type Cast @entity {
id: ID!
2020-05-28 14:50:54 +00:00
"Account that triggered the cast"
account: SmartAccount!
origin: String!
sender: String!
value: BigInt!
}
interface SmartAccountEvent {
id: ID!
2020-05-28 14:50:54 +00:00
"Account scope of the event"
account: SmartAccount!
}
type CastEvent implements SmartAccountEvent @entity {
id: ID!
account: SmartAccount!
2020-05-28 14:50:54 +00:00
origin: String!
sender: String!
value: BigInt!
}
type DisableEvent implements SmartAccountEvent @entity {
id: ID!
account: SmartAccount!
2020-05-28 14:50:54 +00:00
user: User!
}
type EnableEvent implements SmartAccountEvent @entity {
id: ID!
account: SmartAccount!
2020-05-28 14:50:54 +00:00
user: User!
}
type SwitchShieldEvent implements SmartAccountEvent @entity {
id: ID!
account: SmartAccount!
2020-05-28 14:50:54 +00:00
shield: Boolean!
}