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.
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
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.
- 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
Below is a simplified representation of the contract structure and interactions:
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.
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.
The-Poolz Contracts is released under the MIT License.