Whitelisted Redemption
Whitelisted Package Redemption
WhitelistPackageRedemption
provides a simple example of how users can create and redeem packages using the PostOffice contract while enforcing a whitelist requirement for package redemption.
In this contract, users can create packages by calling the createPackage
function, providing the necessary parameters such as the package manager, receiver, password hash, and asset key. The function will invoke the shipPackage
method from the PostOffice contract to create the package.
To redeem a package, users need to call the redeemPackage
function with the package ID, message hash, and an array of signatures. The function will verify the signatures from the whitelisted addresses by calling the verifySignature
function, and if all signatures are valid, it will invoke the redeemPackage
method from the PostOffice contract.
Last updated