This package comprises the following tools.
This branch consists of (simplified versions of) 4 main smart contracts:
SimpleVault.sol
-> Collector locks their NFTs. Vault ownership is transferred to successful bidder from the Buyout process.SimpleMarket.sol
-> Collector sells ERC20 Token0s representing the Vault, by accepting ERC20 Token1 as payment. No individual cap.SimpleMarket2.sol
-> Collector sells ERC20 Token0s representing the Vault, by accepting ERC20 Token1 as payment. Has individual cap.SimpleBuyout.sol
-> Anyone can bid for the Vault using ERC20 Token2. Anyone can stake Token0 to prevent the buyout.
All the contracts in this repository have been written in Solidity v0.7.5
A base template of the user interface.
-
Clone this repository
git clone <repo>
-
cd into the cloned repo
cd b20-contracts
-
Install dependencies via npm
npm install
-
Open new terminal, run ganache
ganache-cli
-
Open new terminal
-
Create a virtual environment
virtualenv -p python3.7 --no-site-packages ~/truffle-venv
-
Activate the virtual environment
source ~/truffle-venv/bin/activate
-
Install vyper using pip
<truffle-venv>pip install vyper
-
Compile the contracts
<truffle-venv>npm run build
-
Run the tests
<truffle-venv>npm run test
-
Run the coverage
<truffle-venv>npm run test-coverage
Note : After test / development, deactivate the virtual environment
<truffle-venv>deactivate