Skip to content

The-Poolz/BatchWithdraw

Repository files navigation

BatchWithdraw

Build and Test codecov CodeFactor

BatchWithdraw simplifies the bulk withdrawal and refund processes for LockDealNFT holders.

Navigation

Installation

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

Functionality

Batch Refund

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.

Batch Withdraw

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.

Withdraw All

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.

Withdraw all by token filter

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.

UML

classDiagram

License

The-Poolz Contracts is released under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages