🔮Subgraphs
The August Digital subgraphs provide an easy way to query our resources' blockchain events.
These subgraphs are created using The Graph Protocol's subgraph service. There are currently 2 subgraphs deployed which are the Lending Pools subgraph on Ethereum and Arbitrum One. These display all events emitted when signers interact with August Digital smart contracts.
Querying
You can query the subgraph using many different approaches depending on your use-case. In browser environments, we recommend using the Apollo Client together with GraphQL. To learn more about how to query the graph, read The Graph Protocol's official documentation.
Lending Pools
Ethereum
Arbitrum
Entities
Lending Pools
Pool
type PoolDeployment @entity {
id: ID!
admin: String! # pool admin
address: String! # pool address
timestamp: Int!
block: Int!
transactionHash: String!
gasPrice: BigInt!
gasLimit: BigInt!
totalSupply: BigInt!
totalBorrow: BigInt!
totalLoans: Int!
# Requiring contract calls
decimals: Int!
symbol: String!
name: String!
withdrawalFee: BigInt!
asset: String!
maxSupply: BigInt!
loansOperator: String!
lagDuration: Int!
processingHour: Int!
}
Deposit
type Deposit @entity(immutable: true) {
id: ID!
sender: String! # sender address
owner: String! # owner address
assets: BigInt!
shares: BigInt!
timestamp: Int!
transactionHash: String!
gasPrice: BigInt!
gasLimit: BigInt!
asset: String! # asset address
pool: String! # pool address
block: Int!
}
Withdrawal Request
type WithdrawalRequest @entity(immutable: true) {
id: ID!
receiver: String! # receiver address
owner: String! # owner address
assets: BigInt!
shares: BigInt!
timestamp: Int!
transactionHash: String!
gasPrice: BigInt!
gasLimit: BigInt!
asset: String! # underlying token address
pool: String! # pool address
block: Int!
day: Int!
month: Int!
year: Int!
}
Withdraw
type Withdraw @entity(immutable: true) {
id: ID!
sender: String! # sender address
owner: String! # owner address
assets: BigInt!
shares: BigInt!
timestamp: Int!
transactionHash: String!
gasPrice: BigInt!
gasLimit: BigInt!
asset: String! # underlying token address
pool: String! # pool address
block: Int!
}
Loans
Loan
type Loan @entity(immutable: true) {
id: ID! # loan address
gasPrice: BigInt!
gasLimit: BigInt!
transactionHash: String!
timestamp: Int!
collateral: String! # collateral token address
asset: String! # underlying token address
pool: String! # pool address
block: Int!
apr: BigInt!
matured: Boolean!
closed: Boolean!
funded: Boolean!
}
Loan Interest Repayments
type LoanInterestRepayment @entity {
id: ID!
amount: BigInt!
timestamp: Int!
}
Loan Principle Repayments
type LoanPrincipalRepayment @entity {
id: ID!
amount: BigInt!
timestamp: Int!
}
Loan Collateral Claims
type LoanCollateralClaim @entity {
id: ID!
amount: BigInt!
timestamp: Int!
}
Last updated