Skip to content

Commit

Permalink
solana: allow to request all instructions of transaction (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
belopash authored Jul 16, 2024
1 parent 62d1878 commit 36ebb4c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@subsquid/solana-stream",
"comment": "allow to request all instructions of transaction",
"type": "minor"
}
],
"packageName": "@subsquid/solana-stream"
}
1 change: 1 addition & 0 deletions solana/solana-stream/src/data/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export interface InstructionRequestWhere {
export interface InstructionRequestRelations {
transaction?: boolean
transactionTokenBalances?: boolean
transactionInstructions?: boolean
logs?: boolean
innerInstructions?: boolean
}
Expand Down
3 changes: 3 additions & 0 deletions solana/solana-stream/src/rpc/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ class BlockFilter {
if (rel.transactionTokenBalances) {
include(this.include.tokenBalances, this.tokenBalancesByTx().get(ins.transactionIndex))
}
if (rel.transactionInstructions) {
include(this.include.instructions, this.instructionsByTx().get(ins.transactionIndex))
}
}
}

Expand Down

0 comments on commit 36ebb4c

Please sign in to comment.