Subgraph

Built With

TheGraph Request URL:

Mainnet (ChainID: 1)

https://thegraph.com/hosted-service/subgraph/party-finance/unvest-v2-mainnet

Görli (ChainID: 5) - Testnet

https://thegraph.com/hosted-service/subgraph/party-finance/unvest-v2-goerli

Optimism (ChainID: 10)

https://thegraph.com/hosted-service/subgraph/party-finance/unvest-v2-optimism

BSC (ChainID: 56)

https://thegraph.com/hosted-service/subgraph/party-finance/unvest-v2-bsc

Polygon (ChainID: 137)

https://thegraph.com/hosted-service/subgraph/party-finance/unvest-v2-polygon

Optimism-Goerli (ChainID: 420) - Testnet

https://thegraph.com/hosted-service/subgraph/party-finance/unvest-v2-optimism-goerli

Arbitrum (ChainID: 42161)

https://thegraph.com/hosted-service/subgraph/party-finance/unvest-v2-arbitrum

Avalanche (ChainID: 43114)

https://thegraph.com/hosted-service/subgraph/party-finance/unvest-v2-avalanche

Mumbai (ChainID: 80001) - Testnet

https://thegraph.com/hosted-service/subgraph/party-finance/unvest-v2-avalanche

Queries

Query a vesting token details

Retrieves the main information for a deployed vesting token

query VestingInfo($vestingToken: ID!) {
  vestingToken(id: $vestingToken) {
    id
    name
    symbol
    decimals
    redeemToken {
      id
      name
      symbol
      decimals
    }
    milestones(first: 1000) {
      timestamp
      ramp
      percentage
    }
    balance {
      allocation
      claimed
      claimable
      locked
      lastClaimedAt
    }
  }
}

Query a user's vesting balance by project

Retrieves the latest user's balance for all vesting tokens in a specific project.

query UserVestingsByProject(
  $userAddress: String!
  $vestingsTokens: [String!]!
  $first: Int = 1000
  $skip: Int = 0
) {
  holderBalances(
    first: $first
    skip: $skip
    where: { user: $userAddress, vestingToken_in: $vestingsTokens }
  ) {
    vestingToken {
      id
    }
    allocation
    claimed
  }
}

Query all vesting balances by project

Retrieves the overall vesting balances in a specific project.

query VestingsBalances(
  $vestingsTokens: [String!]!
  $first: Int = 1000
  $skip: Int = 0
) {
  vestingBalances(
    first: $first
    skip: $skip
    where: { vestingToken_in: $vestingsTokens }
  ) {
    vestingToken {
      id
    }
    allocation
    claimed
  }
}

Query all recipient's balances by vesting

Retrieves all of the recipient's balances by a specific vesting token.

query VestingRecipientBalances(
  $vestingToken: String!
  $first: Int = 1000
  $skip: Int = 0
) {
  holderBalances(
    first: $first
    skip: $skip
    where: { vestingToken: $vestingToken, isRecipient: true }
  ) {
    user
    allocation
    claimed
    balance
    updatedAt
    lastClaimedAt
    transferredIn
    transferredOut
  }
}

Query all the distributions by vesting

Retrieves all of the distributions made by a specific vesting token.

query VestingDistributionBatches(
  $vestingToken: String!
  $first: Int = 1000
  $skip: Int = 0
) {
  distributionBatches(
    first: $first
    skip: $skip
    where: { vestingToken: $vestingToken }
  ) {
    from
    totalAmount
    transactionHash
    blockTimestamp
    recipients {
      to
      value
    }
  }
}

Last updated