Vesting Scheduler Subgraph

Repo

Subgraph Explorers

Mainnets

Ethereum Mainnet

Polygon

Gnosis (xDAI)

Avalanche

Arbitrum

Optimism

Binance Smart Chain (BSC)

Testnets

Polygon Mumbai

Ethereum Goerli

Basic Example Queries

Essential details on vesting schedules

{
  vestingSchedules(first: 10) {
    cliffAmount
    cliffAndFlowExpirationAt
    cliffDate
    tasks {
      id
    }
    endDate
    cliffAndFlowExecutedAt
    createdAt
    startDate
    flowRate
    superToken
  }
}

Querying by tokenSenderReceiverCursor

The tokenSenderReceiverCursor is comprised as "{super token address}-{sender}-{receiver}". This way you can look up vesting schedules with these parameters on hand.

{
  tokenSenderReceiverCursor(
    id: "0x288398f314d472b82c44855f3f6ff20b633c2a97-0x9be85a79d847dfa90584f3fd40cc1f6d4026e2b9-0xf9ce34dfcd3cc92804772f3022af27bcd5e43ff2"
  ) {
    currentVestingSchedule {
      startDate
      endDate
      cliffDate
      endExecutedAt
      cliffAndFlowExecutedAt
    }
    currentCliffAndFlowTask {
      executedAt
      executionAt
      expirationAt
      failedAt
    }
    currentEndVestingTask {
      executedAt
      executionAt
      expirationAt
      failedAt
    }
  }
}

Finding all vesting schedules between a certain sender and receiver.

{
  vestingSchedules(where:{
    and: [
      {sender: "0x9be85a79d847dfa90584f3fd40cc1f6d4026e2b9"}
      {receiver:"0xf9ce34dfcd3cc92804772f3022af27bcd5e43ff2"}
    ]
  }) {
    sender
    receiver
    startDate
    cliffDate
    cliffAmount
    flowRate
    endDate
    tasks {
      type
      executionAt
      expirationAt
    }
  }
}

Last updated