aave-automation-subgraph/schema.graphql
2022-08-30 00:27:47 +05:30

153 lines
2.8 KiB
GraphQL

type ExecutionParams @entity {
id: ID!
collateralToken: Bytes!
debtToken: Bytes!
collateralAmount: BigInt!
debtAmount: BigInt!
collateralAmountWithTotalFee: BigInt!
swap: Swap!
route: BigInt!
rateMode: BigInt!
}
type Swap @entity {
id: ID!
buyToken: Bytes!
sellToken: Bytes!
sellAmt: BigInt!
unitAmt: BigInt!
callData: Bytes!
}
type Spell @entity {
id: ID!
_targets: [String!]!
_datas: [Bytes!]!
}
type TransactionData @entity {
id: ID!
blockNumber: BigInt!
timeStamp: BigInt!
logIndex: BigInt!
transactionHash: Bytes!
transactionLogIndex: BigInt!
}
type Account @entity {
id: ID!
user: Bytes!
submitAutomation: [SubmitData!]! @derivedFrom(field: "account")
executeAutomation: [ExecuteData!]! @derivedFrom(field: "account")
cancelData: [CancelData!]! @derivedFrom(field: "account")
systemCancelData: [SystemCancelData!]! @derivedFrom(field: "account")
failedExecutionData: [FailedExecution!]! @derivedFrom(field: "account")
}
type SubmitData @entity {
id: ID!
user: Bytes!
userId: BigInt!
safeHF: BigInt!
thresholdHF: BigInt!
currentHf: BigInt!
account: Account!
transactionDetail: TransactionData!
}
type ExecuteData @entity {
id: ID!
user: Bytes!
userId: BigInt!
nonce: BigInt!
finalHf: BigInt!
initialHf: BigInt!
automationFee: Int!
params: ExecutionParams!
isSafe: Boolean!
metaData: Bytes!
account: Account!
transactionDetail: TransactionData!
}
type CancelData @entity {
id: ID!
user: Bytes!
userId: BigInt!
nonce: BigInt!
account: Account!
transactionDetail: TransactionData!
}
type SystemCancelData @entity {
id: ID!
user: Bytes!
userId: BigInt!
nonce: BigInt!
errorCode: Int!
account: Account!
transactionDetail: TransactionData!
}
type ChangedOwner @entity {
id: ID!
oldOwner: Bytes!
newOwner: Bytes!
transactionDetail: TransactionData!
}
type FeeTransferData @entity {
id: ID!
recipient: Bytes!
tokens: [Bytes!]!
amount: [BigInt!]!
from: Bytes!
transactionDetail: TransactionData!
}
type SystemCallData @entity {
id: ID!
sender: Bytes!
actionId: String!
metaData: Bytes!
transactionDetail: TransactionData!
}
type UpdateAutomationFeeData @entity {
id: ID!
oldAutomationFee: Int!
newAutomationFee: Int!
transactionDetail: TransactionData!
}
type UpdateBufferHfData @entity {
id: ID!
oldBuffer: BigInt!
newBuffer: BigInt!
transactionDetail: TransactionData!
}
type UpdateMinHfData @entity {
id: ID!
oldMinHf: BigInt!
newMinHf: BigInt!
transactionDetail: TransactionData!
}
type Executor @entity {
id: ID!
executors: [Bytes!]!
}
type FailedExecution @entity {
id: ID!
user: Bytes!
account: Account!
userId: BigInt!
nonce: BigInt!
params: ExecutionParams!
metadata: Bytes!
initialHf: BigInt!
transactionDetail: TransactionData!
}