require(`../../../../../_virtual/_rolldown/runtime.cjs`);const e=require(`../../../functions/utils/amounts.utils.cjs`),t=require(`./AbstractSolanaSnapshotService.cjs`);let n=require(`ethers`);var r=class extends t.AbstractSolanaSnapshotService{constructor(e){super(e,`Nullified`)}_nullifiers;get nullifiers(){return this._nullifiers}serializeSnapshot(e){return{nullifiers:Array.from(e.payload.nullifiers).map(e=>e.toString()),latestBlockNumber:e.latestBlockNumber}}deserializeSnapshot(e){return{latestBlockNumber:e.latestBlockNumber??0,payload:{nullifiers:new Set(e.nullifiers??[])}}}acceptEvent(e,t){try{return this._nullifiers.has(e.nullifier)?!1:(this._nullifiers.add(e.nullifier),!0)}catch(e){return console.error(e),!1}}mapEvent(t){return{nullifier:n.ethers.toBeHex(e.advancedToBigInt(t.getArg(`nullifier`)))}}getSnapshotPayload(){return{nullifiers:this._nullifiers}}populateSnapshot({payload:{nullifiers:e}}){this._nullifiers=e}};exports.AbstractSolanaNullifierSnapshotService=r;