Skip to content

Commit

Permalink
implement daCompressedBlock method
Browse files Browse the repository at this point in the history
  • Loading branch information
Torres-ssf committed Jan 15, 2025
1 parent ceb8d25 commit 4563216
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/account/src/providers/operations.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,12 @@ query getAssetDetails($assetId: AssetId!) {
}
}

query daCompressedBlock($height: U32!) {
daCompressedBlock(height: $height) {
bytes
}
}

mutation dryRun(
$encodedTransactions: [HexString!]!
$utxoValidation: Boolean
Expand Down
12 changes: 12 additions & 0 deletions packages/account/src/providers/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1702,6 +1702,18 @@ Supported fuel-core version: ${supportedVersion}.`
}
}

async daCompressedBlock(height: string) {
const { daCompressedBlock } = await this.operations.daCompressedBlock({
height,
});

if (!daCompressedBlock) {
return null;
}

return daCompressedBlock;
}

/**
* Retrieves transactions based on the provided pagination arguments.
* @param paginationArgs - The pagination arguments for retrieving transactions.
Expand Down

0 comments on commit 4563216

Please sign in to comment.