StraitsX / Orchid-PBM

Smartcontract for the Orchid-PBM
1 stars 0 forks source link

[STRAITSX-10969] feat(noahManager): hashed payment unique id #50

Closed jacobshan closed 1 day ago

jacobshan commented 3 days ago

What does this PR do

  1. update function param name to sourceReferenceID

  2. use keccak256 hash of campaignPBM address and sourceReferenceID as the pendingPaymentList mapping key (new paymentUniqueID).

NOTE: initially wanted to use hash of from and sourceReferenceID but it won't work for grab use case because from will be individual grab user wallet hence the hashed result will be different for different user with the same sourceRefereneceID.

  1. add unique check for the hashed key paymentUniqueID

  2. add indexed fields in the events for easier log filtering.

To be discussed

  1. does the indexed field make sense?

TODO (will be included in the next PR)