BatchWithdraw
simplifies the bulk withdrawal and refund processes for LockDealNFT holders.
Install the packages:
npm i
Compile contracts:
npx hardhat compile
Run tests:
npx hardhat test
Run coverage:
npx hardhat coverage
Deploy:
truffle dashboard
npx hardhat run ./scripts/deploy.ts --network truffleDashboard
function batchRefund(uint256[] calldata tokenIds) external
- This function allows users to batch refund tokens specified by their token IDs (pool ids). It refunds tokens owned by
the caller
to RefundProvider. The tokens must be approved for refunding.
function batchWithdraw(uint256[] calldata tokenIds) external
-
This function allows users to withdraw multiple tokens specified by their token IDs in a batch. It iterates through the provided token IDs (pool ids) and withdraws each token if it is not empty.
-
Users should ensure that they have ownership of the tokens they wish to withdraw and that they have approved the contract to interact with their tokens.
function withdrawAll() external
- This function allows users to withdraw all tokens owned by the caller that are not empty. It iterates through all tokens owned by
the caller
and withdraws each non-empty token.
function withdrawAll(address[] calldata tokenFilter) external
This function allows users to withdraw all tokens owned by the caller that are not empty and match the specified token filter. It iterates through all tokens owned by the caller that match the filter and withdraws each non-empty token.
The-Poolz Contracts is released under the MIT License.