Currently, when the user wants to withdraw their unlock NFTs, they have to perform a transaction PER NFT. A single transaction would be much more ideal for UX.
The Liquifier.sol contract inherits Multicall.sol abstract contract, and thus multicall can be used to batch withdraw calls into a single transaction.
Other calls such as deposit and unlock don't need batching because they are a single operation (ie. stake & unstake).
Alternatively, a different, public & popular multicall contract such as Multicall3 contract @ 0xcA11bde05977b3631167028862bE2a173976CA11. ⚠️ Need to be careful here since this contract isn't owned/written by us.
One downside to using multicall would be that it obscures transaction details. So wallets like MetaMask might show a generic function like aggregate3 (part of the multicall contract) instead of the actual target function and arguments.
Liquifier.sol
contract inheritsMulticall.sol
abstract contract, and thusmulticall
can be used to batch withdraw calls into a single transaction.deposit
andunlock
don't need batching because they are a single operation (ie. stake & unstake).multicall
contract such asMulticall3
contract @0xcA11bde05977b3631167028862bE2a173976CA11
. ⚠️ Need to be careful here since this contract isn't owned/written by us.aggregate3
(part of the multicall contract) instead of the actual target function and arguments.