import { ContractStorageRead, ContractStorageUpdateRequest } from '@aztec/circuits.js'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; import { PublicStateDB } from './db.js'; /** * Implements read/write operations on a contract public storage, collecting * all read and update operations, and collapsing them into a single * read or update per slot. */ export declare class ContractStorageActionsCollector { private db; private address; private readonly contractStorageReads; private readonly contractStorageUpdateRequests; constructor(db: PublicStateDB, address: AztecAddress); /** * Returns the current value of a slot according to the latest update request for it, * falling back to the public db. Collects the operation in storage reads, * as long as there is no existing update request. * @param storageSlot - Slot to check. * @param sideEffectCounter - Side effect counter associated with this storage action. * @returns The current value as affected by all update requests so far. */ read(storageSlot: Fr, sideEffectCounter: number): Promise; /** * Sets a new value for a slot in the internal update requests cache, * clearing any previous storage read or update operation for the same slot. * @param storageSlot - Slot to write to. * @param newValue - Value to write to it. * @param sideEffectCounter - Side effect counter associated with this storage action. */ write(storageSlot: Fr, newValue: Fr, sideEffectCounter: number): Promise; /** * Returns all storage reads and update requests performed. * @returns All storage read and update requests. */ collect(): [ContractStorageRead[], ContractStorageUpdateRequest[]]; } //# sourceMappingURL=state_actions.d.ts.map