npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@poolzfinance/vault-manager

v1.0.1

Published

Vault Manager is a smart contract project that helps other contracts manage ERC20 tokens and maintain whitelists for each token.

Downloads

13

Readme

Vault Manager

Description

Vault Manager is a smart contract project that helps other contracts manage ERC20 tokens and maintain whitelists for each token.

Features

  • Management of ERC20 tokens
  • Whitelisting functionalities
  • Owner-based actions

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/The-Poolz/VaultManager.git
  1. Install the dependencies:
npm install
  1. Run the Hardhat test:
npx hardhat test

Usage

After deploying the contracts, the owner (the deployer) can perform various operations.

From an External Contract

Deposit

To deposit tokens into a vault, the external contract should call depositByToken from VaultManager.sol. Make sure that msg.sender is set to the _from address.

Withdraw

To withdraw tokens, the external contract calls thewithdraw` function.

Owner Functionalities

If you are the owner of the deployed contracts, you have the following additional functionalities:

In VaultManager.sol

  1. Set Trustee: Must be called to finish the setup and can only be called once. After that, use updateTrustee to change the trustee.
  2. Set Trade Start Time: Can be used to change the trade start time initially set during vault creation with createNewVault.
  3. Set Vault Royalty: Can be used to change the royalty details initially set during vault creation with createNewVault.
  4. Create New Vault: This function has multiple overloads, allowing you to create new vaults with different configurations.
  5. Update Trustee: You can update the trustee address using updateTrustee.

In Vault.sol

The Vault is an internal contract that is managed solely by its creator, the VaultManager contract. No one else can interact with it directly. It serves as a small internal part responsible for specific functionalities like withdraw.

  1. Withdraw: The Vault Manager, which is the entity that creates the vault, has the ability to withdraw tokens to a specified address using the withdraw function.

Role of the Trustee

Only the trustee can use the tokens stored in the vaults, not the owner.

Code Overview

Solidity Contracts

Tests

Contributing

Feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License.