Git Product home page Git Product logo

batchwithdraw's Introduction

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.

batchwithdraw's People

Contributors

youstillalive avatar lomet avatar

Watchers

 avatar

batchwithdraw's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.