File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
contract_function_simulator
storage/tagging_data_provider Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ export class PXEOracleInterface implements ExecutionDataProvider {
291291 // contractName,
292292 // contractAddress,
293293 // });
294- await this . taggingDataProvider . setTaggingSecretIndexAsSender ( directionalAppTaggingSecret , index + 1 ) ;
294+ await this . taggingDataProvider . setTaggingSecretIndexesAsSender ( [ { directionalAppTaggingSecret, index : index + 1 } ] ) ;
295295
296296 // Compute and return the tag using the current index
297297 return computeTag ( directionalAppTaggingSecret , index ) ;
@@ -389,7 +389,9 @@ export class PXEOracleInterface implements ExecutionDataProvider {
389389
390390 const contractName = await this . contractDataProvider . getDebugContractName ( contractAddress ) ;
391391 if ( currentIndex !== oldIndex ) {
392- await this . taggingDataProvider . setTaggingSecretIndexAsSender ( directionalAppTaggingSecret , currentIndex ) ;
392+ await this . taggingDataProvider . setTaggingSecretIndexesAsSender ( [
393+ { directionalAppTaggingSecret, index : currentIndex } ,
394+ ] ) ;
393395
394396 this . log . debug (
395397 `Syncing logs for secret ${ directionalAppTaggingSecret . toString ( ) } at contract ${ contractName } (${ contractAddress } )` ,
Original file line number Diff line number Diff line change @@ -22,8 +22,12 @@ export class TaggingDataProvider {
2222 this . #taggingSecretIndexesAsRecipients = this . #store. openMap ( 'tagging_secret_indexes_as_recipients' ) ;
2323 }
2424
25- setTaggingSecretIndexAsSender ( directionalAppTaggingSecret : Fr , index : number ) {
26- return this . #taggingSecretIndexesAsSenders. set ( directionalAppTaggingSecret . toString ( ) , index ) ;
25+ setTaggingSecretIndexesAsSender ( indexedTaggingSecrets : IndexedTaggingSecret [ ] ) {
26+ return Promise . all (
27+ indexedTaggingSecrets . map ( ( { directionalAppTaggingSecret, index } ) =>
28+ this . #taggingSecretIndexesAsSenders. set ( `${ directionalAppTaggingSecret . toString ( ) } ` , index ) ,
29+ ) ,
30+ ) ;
2731 }
2832
2933 setTaggingSecretsIndexesAsRecipient ( indexedTaggingSecrets : IndexedTaggingSecret [ ] ) {
You can’t perform that action at this time.
0 commit comments