Reference@proto-kit/sequencerClassesInMemoryTransactionStorage

@proto-kit/sequencer • Docs


Documentation / @proto-kit/sequencer / InMemoryTransactionStorage

Class: InMemoryTransactionStorage

Implements

Constructors

new InMemoryTransactionStorage()

new InMemoryTransactionStorage(blockStorage, batchStorage): InMemoryTransactionStorage

Parameters

• blockStorage: BlockStorage

• batchStorage: InMemoryBatchStorage

Returns

InMemoryTransactionStorage

Defined in

packages/sequencer/src/storage/inmemory/InMemoryTransactionStorage.ts:18

Methods

countPendingUserTransactions()

countPendingUserTransactions(): Promise<number>

Returns

Promise<number>

Implementation of

TransactionStorage.countPendingUserTransactions

Defined in

packages/sequencer/src/storage/inmemory/InMemoryTransactionStorage.ts:69


findTransaction()

findTransaction(hash): Promise<undefined | object>

Finds a transaction by its hash. It returns both pending transaction and already included transactions In case the transaction has been included, it also returns the block hash and batch number where applicable.

Parameters

• hash: string

Returns

Promise<undefined | object>

Implementation of

TransactionStorage.findTransaction

Defined in

packages/sequencer/src/storage/inmemory/InMemoryTransactionStorage.ts:103


getPendingUserTransactions()

getPendingUserTransactions(offset, limit?): Promise<PendingTransaction[]>

Parameters

• offset: number

• limit?: number

Returns

Promise<PendingTransaction[]>

Implementation of

TransactionStorage.getPendingUserTransactions

Defined in

packages/sequencer/src/storage/inmemory/InMemoryTransactionStorage.ts:37


pushUserTransaction()

pushUserTransaction(tx, priority): Promise<boolean>

Parameters

• tx: PendingTransaction

• priority: number

Returns

Promise<boolean>

Implementation of

TransactionStorage.pushUserTransaction

Defined in

packages/sequencer/src/storage/inmemory/InMemoryTransactionStorage.ts:73


removeTx()

removeTx(hashes): Promise<void>

Parameters

• hashes: string[]

Returns

Promise<void>

Implementation of

TransactionStorage.removeTx

Defined in

packages/sequencer/src/storage/inmemory/InMemoryTransactionStorage.ts:24


reportChangedPaths()

reportChangedPaths(paths): Promise<void>

Parameters

• paths: bigint[]

Returns

Promise<void>

Implementation of

TransactionStorage.reportChangedPaths

Defined in

packages/sequencer/src/storage/inmemory/InMemoryTransactionStorage.ts:165


reportSkippedTransactions()

reportSkippedTransactions(paths): Promise<void>

Mapping hash => path[]

Parameters

• paths: Record<string, bigint[]>

Returns

Promise<void>

Implementation of

TransactionStorage.reportSkippedTransactions

Defined in

packages/sequencer/src/storage/inmemory/InMemoryTransactionStorage.ts:149