August
  • 👋Introduction
  • 🎦Protocol Overview
  • 🪙Token & Tokenomics
  • Using August
    • 🚄TWAP
  • Smart Contracts
    • 🚥Risks and Audits
    • 🔗Contract Addresses
  • Developers
    • 📦Javascript SDK
      • 🤽Lending Pools
      • ⚡Utilities
      • 🔤Types
      • 📜ABI's
    • 🔮Subgraphs
  • Legal
    • 🗒️Legal
      • Terms of Service
      • Privacy Policy
      • Cookie Policy
  • Community
    • Home Page
    • X
Powered by GitBook
On this page
  • Querying
  • Lending Pools
  • Entities
  • Lending Pools
  • Loans
  1. Developers

Subgraphs

The August Digital subgraphs provide an easy way to query our resources' blockchain events.

PreviousABI'sNextLegal

Last updated 3 months ago

These subgraphs are created using . 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 .

Querying

You can query the subgraph using many different approaches depending on your use-case. In browser environments, we recommend using the . To learn more about how to query the graph, read .

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!
}
🔮
The Graph Protocol's subgraph service
August Digital smart contracts
Apollo Client together with GraphQL
The Graph Protocol's official documentation
LogoThe GraphiQL
LogoThe GraphiQL