The-Poolz / Poolz-Back

smart contracts using solidity for erc20 tokens to eth and erc20 to erc20
https://www.poolz.finance
MIT License
13 stars 9 forks source link
cross-platform defi ethereum-contract solidity-dapps

Poolz-Back

Build Status codecov CodeFactor

The-Poolz core decentralized application for creating Initial DEX Offerings.

Navigation

npm install

Testing

truffle run coverage

Deployment

truffle dashboard
truffle migrate --f 1 --to 1 --network dashboard

UML

classDiagram

Create new Pool

https://github.com/The-Poolz/Poolz-Back/blob/466fb0048c571f9a916f33a7b44687fd78fbde66/contracts/Pools.sol#L49-L60

_Token - ERC20 token address for sale.

_FinishTime - after the time finished the pool expired. PO can withdraw remaining tokens.

_Rate - during the investment period, the rate will be multiplied by the investment amount.

_POZRate - rate for whitelisted users. _POZRate must be greater than the regular rate.

_StartAmount - total amount of the tokens to sell in the IDO. The contract will lock the tokens until the investment time.

_LockedUntil - set to zero to use Direct Sales Pools, or enter a time in the future to use Time-Locked Pools.

_MainCoin - trading token address. Investors will use this token/coin to purchase IDO tokens.

_Is21Decimal - If true, the rate will be rate*10^-21.

_Now - start pool time. Tokens can only be purchased after the start time.

_WhiteListId - the whitelist ID we will be working with. The white list contains a list of users with primary access to sales.

Pool types

The main types are Direct Selling Pools (DSP) and Time Locked Pools (TLP).

Pool statuses

https://github.com/The-Poolz/Poolz-Back/blob/6206ad88b15697946453ddfd26e02610bef93ec6/contracts/PoolsData.sol#L7

License

The-Poolz Contracts is released under the MIT License.