khelil / starkgate-subgraph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

StarkGate Subgraph

StarkNet is a permissionless decentralized ZK-Rollup. It operates as an L2 network over Ethereum, enabling any dApp to achieve unlimited scale for its computation – without compromising Ethereum's composability and security.

https://starkware.co/starknet/

StarkGate serves as a gateway between Ethereum and StarkNet, and allows users to do everything they can expect from a bridge.

The bridge is deployed on Testnet and Mainnet.

StarkGate subgraph is a hosted service developed on The Graph.
StarkGate subgraph allow you to query deposits and withdraws on the bridge.

Queries

{
  depositEvents(first: 5) {
    id
    bridgeAddressL1
    bridgeAddressL2
    l2Recipient
  }
  unfinishedDeposits(first: 5) {
    id
    depositEvents {
      id
    }
  }
}

GraphQL Schema

type DepositEvent @entity {
  "uniq ID"
  id: ID!
  bridgeAddressL1: Bytes!
  bridgeAddressL2: Bytes!
  l2Recipient: Bytes!
  amount: BigInt!
  status: TransferStatus!
  createdAtBlock: BigInt!
  createdTxHash: Bytes!
  finishedAtBlock: BigInt
  finishedAtDate: BigInt
  finishedTxHash: Bytes
}
type WithdrawalEvent @entity {
  "uniq ID"
  id: ID!
  bridgeAddressL1: Bytes!
  bridgeAddressL2: Bytes!
  l1Recipient: Bytes!
  amount: BigInt!
  status: TransferStatus!
  createdAtBlock: BigInt!
  createdTxHash: Bytes!
  finishedAtBlock: BigInt
  finishedAtDate: BigInt
  finishedTxHash: Bytes
}

About


Languages

Language:TypeScript 100.0%