2020-05-20 20:31:12 +00:00
|
|
|
type User @entity {
|
|
|
|
id: ID!
|
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"List of all the smart accounts currently owned by this user"
|
2020-05-20 20:31:12 +00:00
|
|
|
smartAccountsOwned: [SmartAccount!]! @derivedFrom(field:"owner")
|
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"List of all the smart accounts created by this user"
|
2020-05-20 20:31:12 +00:00
|
|
|
smartAccountsCreated: [SmartAccount!]! @derivedFrom(field:"creator")
|
|
|
|
}
|
|
|
|
|
|
|
|
type SmartAccount @entity {
|
2020-06-03 15:01:36 +00:00
|
|
|
"The ID used for the SmartAccount entity is the address of said smart account"
|
2020-05-20 20:31:12 +00:00
|
|
|
id: ID!
|
|
|
|
|
2020-05-26 21:48:45 +00:00
|
|
|
"Latest enabled owner"
|
|
|
|
owner: User
|
2020-05-20 20:31:12 +00:00
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"Sender of the creation transaction"
|
2020-05-22 14:45:22 +00:00
|
|
|
creator: User
|
2020-05-20 20:31:12 +00:00
|
|
|
|
2020-06-03 15:01:36 +00:00
|
|
|
origin: Bytes!
|
|
|
|
|
|
|
|
accountID: BigInt!
|
2020-05-22 14:45:22 +00:00
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"Account module from which this account was created. It holds the connectors linked to this account."
|
2020-05-22 14:45:22 +00:00
|
|
|
accountModule: AccountModule
|
2020-05-26 21:48:45 +00:00
|
|
|
|
|
|
|
shield: Boolean
|
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"Whether the owner is currently enabled to use this account or not"
|
2020-05-26 21:48:45 +00:00
|
|
|
isEnabled: Boolean!
|
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"Casts made by this smart account"
|
2020-05-26 21:48:45 +00:00
|
|
|
casts: [Cast!]! @derivedFrom(field: "account")
|
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"Events that ocurred within this account scope"
|
2020-06-03 15:01:36 +00:00
|
|
|
accountEvents: [SmartAccountEvent!]! @derivedFrom(field: "account")
|
|
|
|
|
|
|
|
"Events triggered by this account withing a connectors' scope"
|
|
|
|
connectorEvents: [ConnectorEvent!]! @derivedFrom(field: "account")
|
2020-05-20 20:31:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type AccountModule @entity {
|
|
|
|
"ID is the account module version"
|
|
|
|
id: ID!
|
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"Base address of the module"
|
2020-06-03 15:01:36 +00:00
|
|
|
address: Bytes!
|
2020-05-20 20:31:12 +00:00
|
|
|
|
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."
|
2020-05-22 16:35:24 +00:00
|
|
|
connectors: InstaConnector!
|
2020-05-20 20:31:12 +00:00
|
|
|
|
2020-06-03 15:01:36 +00:00
|
|
|
check: Bytes
|
2020-05-20 20:31:12 +00:00
|
|
|
|
|
|
|
instaIndex: InstaIndex!
|
2020-05-22 14:45:22 +00:00
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"List of all the accounts that used this module."
|
2020-05-22 14:45:22 +00:00
|
|
|
accountsCloned: [SmartAccount!]! @derivedFrom(field: "accountModule")
|
2020-05-20 20:31:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type InstaIndex @entity {
|
|
|
|
id: ID!
|
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"Address of the current master"
|
2020-06-03 15:01:36 +00:00
|
|
|
master: Bytes
|
|
|
|
|
|
|
|
instaListAddress: Bytes
|
2020-05-20 20:31:12 +00:00
|
|
|
|
|
|
|
accountModules: [AccountModule!]! @derivedFrom(field: "instaIndex")
|
|
|
|
}
|
2020-05-22 16:35:24 +00:00
|
|
|
|
|
|
|
type InstaConnector @entity {
|
|
|
|
"Address of the InstaConnector contract. This contract has a list of connectors tracked."
|
|
|
|
id: ID!
|
|
|
|
|
2020-05-22 20:24:12 +00:00
|
|
|
chiefs: [Chief!]! @derivedFrom(field: "instaConnector")
|
|
|
|
|
2020-05-22 16:35:24 +00:00
|
|
|
connectors: [Connector!]! @derivedFrom(field: "instaConnector")
|
|
|
|
}
|
|
|
|
|
|
|
|
type Connector @entity {
|
2020-06-03 15:01:36 +00:00
|
|
|
"ID used for this entity includes the internal ID of the connector and it's type"
|
2020-05-22 16:35:24 +00:00
|
|
|
id: ID!
|
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"Whether this connector is a Static Connector or not."
|
2020-05-22 16:35:24 +00:00
|
|
|
isStatic: Boolean!
|
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"Whether this Connector is enabled or not."
|
2020-05-22 16:35:24 +00:00
|
|
|
isEnabled: Boolean!
|
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"InstaConnectors contract where this Connector is linked"
|
2020-05-22 16:35:24 +00:00
|
|
|
instaConnector: InstaConnector!
|
2020-05-22 20:24:12 +00:00
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"Connector name"
|
2020-05-22 20:24:12 +00:00
|
|
|
name: String!
|
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"Connector ID within the InstaConnectors contract"
|
2020-05-22 20:24:12 +00:00
|
|
|
connectorID: BigInt!
|
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"Connector type."
|
2020-05-22 20:24:12 +00:00
|
|
|
connectorType: BigInt!
|
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"Address for said connector"
|
2020-06-03 15:01:36 +00:00
|
|
|
address: Bytes!
|
|
|
|
|
|
|
|
"ConnectorEvents that were triggered for this connector"
|
|
|
|
events: [ConnectorEvent!]! @derivedFrom(field: "connector")
|
2020-05-22 20:24:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Chief @entity {
|
|
|
|
id: ID!
|
|
|
|
|
|
|
|
isActive: Boolean!
|
|
|
|
|
|
|
|
instaConnector: InstaConnector!
|
2020-05-22 16:35:24 +00:00
|
|
|
}
|
2020-05-26 21:48:45 +00:00
|
|
|
|
|
|
|
type Cast @entity {
|
|
|
|
id: ID!
|
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"Account that triggered the cast"
|
2020-05-26 21:48:45 +00:00
|
|
|
account: SmartAccount!
|
|
|
|
|
2020-06-03 15:01:36 +00:00
|
|
|
origin: Bytes!
|
2020-05-26 21:48:45 +00:00
|
|
|
|
2020-06-03 15:01:36 +00:00
|
|
|
sender: Bytes!
|
2020-05-26 21:48:45 +00:00
|
|
|
|
|
|
|
value: BigInt!
|
|
|
|
}
|
|
|
|
|
|
|
|
interface SmartAccountEvent {
|
|
|
|
id: ID!
|
|
|
|
|
2020-05-28 14:50:54 +00:00
|
|
|
"Account scope of the event"
|
2020-05-26 21:48:45 +00:00
|
|
|
account: SmartAccount!
|
|
|
|
}
|
|
|
|
|
|
|
|
type CastEvent implements SmartAccountEvent @entity {
|
|
|
|
id: ID!
|
|
|
|
|
|
|
|
account: SmartAccount!
|
2020-05-28 14:50:54 +00:00
|
|
|
|
2020-06-03 15:01:36 +00:00
|
|
|
origin: Bytes!
|
2020-05-28 14:50:54 +00:00
|
|
|
|
2020-06-03 15:01:36 +00:00
|
|
|
sender: Bytes!
|
2020-05-28 14:50:54 +00:00
|
|
|
|
|
|
|
value: BigInt!
|
2020-05-26 21:48:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type DisableEvent implements SmartAccountEvent @entity {
|
|
|
|
id: ID!
|
|
|
|
|
|
|
|
account: SmartAccount!
|
2020-05-28 14:50:54 +00:00
|
|
|
|
|
|
|
user: User!
|
2020-05-26 21:48:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type EnableEvent implements SmartAccountEvent @entity {
|
|
|
|
id: ID!
|
|
|
|
|
|
|
|
account: SmartAccount!
|
2020-05-28 14:50:54 +00:00
|
|
|
|
|
|
|
user: User!
|
2020-05-26 21:48:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type SwitchShieldEvent implements SmartAccountEvent @entity {
|
|
|
|
id: ID!
|
|
|
|
|
|
|
|
account: SmartAccount!
|
2020-05-28 14:50:54 +00:00
|
|
|
|
|
|
|
shield: Boolean!
|
2020-05-26 21:48:45 +00:00
|
|
|
}
|
2020-06-03 15:01:36 +00:00
|
|
|
|
|
|
|
type ConnectorEvent @entity {
|
|
|
|
id: ID!
|
|
|
|
|
|
|
|
connector: Connector!
|
|
|
|
|
|
|
|
account: SmartAccount!
|
|
|
|
|
|
|
|
eventCode: Bytes!
|
|
|
|
|
|
|
|
eventData: Bytes!
|
|
|
|
}
|