instadapp-dsa-subgraph/schema.graphql

231 lines
4.2 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 {
"The ID used for the SmartAccount entity is the accountID for that SmartAccount on the InstaList contract"
id: ID!
"Latest enabled owner"
owner: User
2020-05-28 14:50:54 +00:00
"Sender of the creation transaction"
creator: User
origin: Bytes!
"AccountID as BigInt according to the InstaList contract"
accountID: BigInt!
"Address of the SmartAccount"
address: Bytes!
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"
accountEvents: [SmartAccountEvent!]! @derivedFrom(field: "account")
"Events triggered by this account withing a connectors' scope"
connectorEvents: [ConnectorEvent!]! @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: Bytes!
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: Bytes
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: Bytes
instaListAddress: Bytes
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 {
"ID used for this entity includes the internal ID of the connector and it's type"
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: Bytes!
"ConnectorEvents that were triggered for this connector"
events: [ConnectorEvent!]! @derivedFrom(field: "connector")
}
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: Bytes!
sender: Bytes!
value: BigInt!
tx_hash: String!
block: BigInt!
logIndex: BigInt!
}
interface SmartAccountEvent {
id: ID!
2020-05-28 14:50:54 +00:00
"Account scope of the event"
account: SmartAccount!
tx_hash: String!
block: BigInt!
logIndex: BigInt!
}
type CastEvent implements SmartAccountEvent @entity {
id: ID!
account: SmartAccount!
2020-05-28 14:50:54 +00:00
origin: Bytes!
2020-05-28 14:50:54 +00:00
sender: Bytes!
2020-05-28 14:50:54 +00:00
value: BigInt!
tx_hash: String!
block: BigInt!
logIndex: BigInt!
}
type DisableEvent implements SmartAccountEvent @entity {
id: ID!
account: SmartAccount!
2020-05-28 14:50:54 +00:00
user: User!
tx_hash: String!
block: BigInt!
logIndex: BigInt!
}
type EnableEvent implements SmartAccountEvent @entity {
id: ID!
account: SmartAccount!
2020-05-28 14:50:54 +00:00
user: User!
tx_hash: String!
block: BigInt!
logIndex: BigInt!
}
type SwitchShieldEvent implements SmartAccountEvent @entity {
id: ID!
account: SmartAccount!
2020-05-28 14:50:54 +00:00
shield: Boolean!
tx_hash: String!
block: BigInt!
logIndex: BigInt!
}
type ConnectorEvent @entity {
id: ID!
connector: Connector!
account: SmartAccount!
eventCode: Bytes!
eventData: Bytes!
tx_hash: String!
block: BigInt!
logIndex: BigInt!
}