Smart-contracts of CurioInvest project.
With using Truffle framework. Powered by Ethereum.
Token represents shares of Ferrari F12tdf car. Number of shares equal car price in USD.
- ERC20 interface
- 18 decimals
- 1100000 total supply
Represents unique car-tokens of Curio garage.
- ERC721 interface
- 1 NFT token represents 1 ERC20 car-token (include address and car name as token URI)
- Owner of contract can mint new tokens, transfer tokens to new car owner
Allows to purchase CarToken1 for accepted stable tokens (e.g. TrueUSD, or DAI).
- Purchase tokens for others tokens
- Buy out all tokens (even those that were bought by other investors) with the payment of investors rewards
- Refund if the goal was not reached
- Post-delivery logic
- Timed logic
- Whitelisted logic
- Linux (for run bash scripts)
- Node v10.14.1, NPM v6.9.0
npm i
npm run compile
Using local truffle develop network.
npx truffle develop
truffle(develop)> test
Create file .env
in root project directory. Fill out environment variables as in .env.example
.
INFURA_PROJECT_ID
- Project ID for Infura provider;MAINNET_MNEMONIC
- Mnemonic phrase of deployer wallets;MAINNET_GAS_LIMIT
- Gas limit value;MAINNET_GAS_PRICE
- Gas price value;ROPSTEN_MNEMONIC
- Mnemonic phrase of deployer wallets (for Ropsten network);ROPSTEN_GAS_LIMIT
- Gas limit value (for Ropsten network);ROPSTEN_GAS_PRICE
- Gas price value (for Ropsten network);
Create file <netName>.json
in config/params
directory. Fill out the config as in config/params/example.json
.
netNames:
[
"development",
"ropsten",
"mainnet"
]
openingTime
- Crowdsale opening time;closingTime
- Crowdsale closing time;wallet
- Address where collected funds will be forwarded to;acceptedToken
- Address of the accepted token (stable token);rate
- Number of token units a buyer gets per accepted token's unit;goal
- Raise goal in accepted token units (soft and hard cap);rewardsPercent
- Percent of investor's rewards after all tokens purchased (0-10,000).
npx truffle compile
npx truffle migrate --network <netName> --reset
netNames:
[
"development",
"ropsten",
"mainnet"
]