Batch
Creating streams in bulk is possible using the SablierBatchLockup contract. See https://github.com/sablier-labs/lockup/blob/v2.0/src/SablierBatchLockup.sol
The entity can be immutable because a batch is only updated in the same block. See https://thegraph.com/docs/en/subgraphs/developing/creating/ql-schema/#defining-entities
type Batch {
id: String!
hash: Bytes
timestamp: BigInt
batcher: Batcher
size: BigInt!
streams(
skip: Int = 0
first: Int = 100
orderBy: Stream_orderBy
orderDirection: OrderDirection
where: Stream_filter
): [Stream!]!
}
Fields
Batch.id
● String!
non-null scalar
Unique identifier: {chainId}-{txHash}-{batcher}
Batch.hash
● Bytes
scalar
Hash of the Ethereum transaction that created this batch.
Batch.timestamp
● BigInt
scalar
Timestamp of the transaction that created this batch.
Batch.batcher
● Batcher
object
The sender address that created this batch.
Batch.size
● BigInt!
non-null scalar
Number of streams part of this batch.
Batch.streams
● [Stream!]!
non-null object
Streams part of this batch.