type User @entity { id: ID! smartAccountsOwned: [SmartAccount!]! @derivedFrom(field:"owner") smartAccountsCreated: [SmartAccount!]! @derivedFrom(field:"creator") } type SmartAccount @entity { id: ID! "Latest enabled owner" owner: User creator: User origin: String! accountModule: AccountModule shield: Boolean isEnabled: Boolean! casts: [Cast!]! @derivedFrom(field: "account") events: [SmartAccountEvent!]! @derivedFrom(field: "account") } type AccountModule @entity { "ID is the account module version" id: ID! address: String! connectors: InstaConnector! check: String instaIndex: InstaIndex! accountsCloned: [SmartAccount!]! @derivedFrom(field: "accountModule") } type InstaIndex @entity { id: ID! 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! isStatic: Boolean! isEnabled: Boolean! instaConnector: InstaConnector! name: String! connectorID: BigInt! connectorType: BigInt! address: String! } type Chief @entity { id: ID! isActive: Boolean! instaConnector: InstaConnector! } type Cast @entity { id: ID! account: SmartAccount! origin: String! sender: String! value: BigInt! } interface SmartAccountEvent { id: ID! account: SmartAccount! } type CastEvent implements SmartAccountEvent @entity { id: ID! account: SmartAccount! } type DisableEvent implements SmartAccountEvent @entity { id: ID! account: SmartAccount! } type EnableEvent implements SmartAccountEvent @entity { id: ID! account: SmartAccount! } type SwitchShieldEvent implements SmartAccountEvent @entity { id: ID! account: SmartAccount! }