Skip to content

Commit

Permalink
updated docs and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Oct 11, 2023
1 parent 3195aec commit 6a450f6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion yarn-project/archiver/src/archiver/archiver_store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ export class MemoryArchiverStore implements ArchiverDataStore {
* Gets unencrypted logs based on the provided filter.
* @param filter - The filter to apply to the logs.
* @returns The requested logs.
* @throws If filter is invalid.
* @remarks Works by doing an intersection of all params in the filter.
*/
getUnencryptedLogs(filter: LogFilter): Promise<GetsUnencryptedLogsResponse> {
let txHash: TxHash | undefined;
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ aztec-cli parse-parameter-struct 0xabcdef1234567890abcdef1234567890abcdef1234567

### get-logs

Gets all the unencrypted logs from L2 blocks in the specified range.
Applies filter and returns the resulting unencrypted logs.
The filter is applied by doing an intersection of all its params.

Syntax:

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export function getProgram(log: LogFn, debugLogger: DebugLogger): Command {

program
.command('get-logs')
.description('Gets all the unencrypted logs from L2 blocks in the range specified.')
.description('Gets all the unencrypted logs from an intersection of all the filter params.')
.option('-tx, --tx-hash <txHash>', 'A transaction hash to get the receipt for.', parseOptionalTxHash)
.option(
'-fb, --from-block <blockNum>',
Expand Down
6 changes: 2 additions & 4 deletions yarn-project/types/src/logs/log_filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,21 @@ import { LogId, TxHash } from '../index.js';

/**
* Log filter used to fetch L2 logs.
* @remarks This filter is applied as an intersection of all it's params.
*/
export type LogFilter = {
/**
* Hash of a transaction from which to fetch the logs.
* @remarks If this is set, `fromBlock` and `toBlock` can't be defined.
*/
txHash?: TxHash;
/**
* The block number from which to start fetching logs (inclusive).
* @remarks If this is set, `txHash` can't be defined.
*/
fromBlock?: number;
/** The block number until which to fetch logs (not inclusive). */
toBlock?: number;
/**
* Log id after which to start fetching logs .
* @remarks This is a continuation parameter and when it is set, txHash and fromBlock and toBlock are ignored.
* Log id after which to start fetching logs.
*/
afterLog?: LogId;
/** The contract address to filter logs by. */
Expand Down

0 comments on commit 6a450f6

Please sign in to comment.