Smart-escrow contracts
Baked with <3 by Jincor
Smart-escrow
This contract should receive money from investors(crowdsale) and control phased money spendings raised during token sale by the team. Each next tranche of ETH to the team is allowed only after approval of previous phases by the team with the documents and according to the roadmap.
Settings:
- Voting round length(start time, end time)
- Min number of tokens required to participate in round
- Percent of positive votes required to succeed(calculated based on fact amount of voters)
- Voting reason
- Message
- Value < this.balance
New voting round can be initiated from admin panel. New vote round can be initiated only after approval documentation uploaded
If round succeed we must send the corresponding value of ETH to the team. If failed - ETH should be available to withdraw by token holders R = (ETH / A) * V
.
R - reward
ETH - amount of ETH tranche Value
A - total supply of all tokens
V - amount of tokens on holders balance
Contract architecture
We tried to develop as simple and flat contract as we can.
How to setup development environment and run tests?
- Install
docker
if you don't have it. - Clone this repo.
- Run
docker-compose build --no-cache
. - Run
docker-compose up -d
. - Install dependencies:
docker-compose exec workspace yarn
. - To run tests:
docker-compose exec workspace truffle test
. - To merge your contracts via sol-merger run:
docker-compose exec workspace yarn merge
. Merged contracts will appear inmerge
directory.