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 { "The ID used for the SmartAccount entity is the accountID for that SmartAccount on the InstaList contract" id: ID! "Latest enabled owner" owner: User "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! "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" 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! "Base address of the module" address: Bytes! "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! "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: 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! "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: 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! "Account that triggered the cast" account: SmartAccount! origin: Bytes! sender: Bytes! value: BigInt! tx_hash: String! block: BigInt! logIndex: BigInt! } interface SmartAccountEvent { id: ID! "Account scope of the event" account: SmartAccount! tx_hash: String! block: BigInt! logIndex: BigInt! } type CastEvent implements SmartAccountEvent @entity { id: ID! account: SmartAccount! origin: Bytes! sender: Bytes! value: BigInt! tx_hash: String! block: BigInt! logIndex: BigInt! } type DisableEvent implements SmartAccountEvent @entity { id: ID! account: SmartAccount! user: User! tx_hash: String! block: BigInt! logIndex: BigInt! } type EnableEvent implements SmartAccountEvent @entity { id: ID! account: SmartAccount! user: User! tx_hash: String! block: BigInt! logIndex: BigInt! } type SwitchShieldEvent implements SmartAccountEvent @entity { id: ID! account: SmartAccount! 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! }