Skip to content

Latest commit

 

History

History
101 lines (68 loc) · 3.25 KB

README.md

File metadata and controls

101 lines (68 loc) · 3.25 KB

InvestedProvider

Build and Test codecov CodeFactor License

InvestedProvider is a smart contract that serves as proof of investment. Each time participants invest in an IDO, they will receive an InvestedProvider NFT as a mark and proof of successful investment.

Navigation

Installation

Install the packages:

npm i

Compile contracts:

npx hardhat compile

Run tests:

npx hardhat test

Run coverage:

npx hardhat coverage

Deploy:

npx truffle dashboard
npx hardhat run ./scripts/deploy.ts --network truffleDashboard

Overview

The InvestedProvider contract is designed to track and verify investment participation in IDOs. It confirms ownership of investments through NFTs and integrates with the LockDealNFT system to manage provider and deal-related states.

Key Features:

  • Proof of Investment: Provides an NFT as proof of successful investment.
  • Security Modifiers: Includes checks for valid parameters and provider addresses to ensure secure operation.
  • Firewall Protection: Utilizes firewall protections to prevent unauthorized actions like withdrawals and splits.
  • Provider Registration: Manages the registration of investment pools, associating them with specific investment IDs and amounts

UML

Below is a simplified representation of the contract structure and interactions: classDiagram

Functions

registerPool

Registers a pool with the given parameters. Only contracts approved by LockDealNFT are allowed to call this function.

function registerPool(
    uint256 poolId,
    uint256[] calldata params
) external firewallProtected onlyProvider;
  • poolId: The ID of the pool being registered.
  • params: An array containing the parameters for the pool. The first element represents the amount, and the second element represents the investment ID.

getParams

Retrieves the parameters associated with a specific pool ID.

function getParams(
    uint256 poolId
) external view returns (uint256[] memory params);
  • poolId: The ID of the pool.
  • Returns: An array containing two elements: the amount associated with the pool and the investment ID.

License

The-Poolz Contracts is released under the MIT License.