Skip to content

ParsaAminpour/DeFi__AviatoSwap

Repository files navigation

Aviato Swap architecture

Aviato Swap project is a decentralized exchange powered by UniswapV2 architecture which is contain a DAO system for any upgrading from the system.

The smart contract developed via Brownie framework and the front-end section is based on ReactJs (Front-end hasn't completed yet and indicating the result will accomplish via brownie scripts)

Installation

via pipx

The recommended way to install Brownie is via pipx. pipx installs Brownie into a virtual environment and makes it available directly from the commandline. Once installed, you will never have to activate a virtual environment prior to using Brownie.

To install pipx:

python3 -m pip install --user pipx
python3 -m pipx ensurepath

To install Brownie using pipx:

pipx install eth-brownie

To upgrade to the latest version:

pipx upgrade eth-brownie

To use lastest master or another branch as version:

pipx install git+https://github.com/eth-brownie/brownie.git@master

via pip

You can install the latest release via pip:

pip install eth-brownie

via setuptools

You can clone the repository and use setuptools for the most up-to-date version:

git clone https://github.com/eth-brownie/brownie.git
cd brownie
python3 setup.py install

Ganache-cli Installation

For run the Brownie scripts you need to run Ganachec-cli as a local blockchain For do that run this command as Installation:

Using npm:

npm install -g ganache-cli

or, if you are using Yarn:

yarn global add ganache-cli

Screenshots

AviatoSwapContractDiagram

Deployment

To deploy this project via its brownie scripts:

First off all you should run ganache-cli inside your environment After adjusting WEB3_INFURA_ENDPOINT in you .env file (from Infura) you should run source.env and then you have to run (for mainnet-fork):

ganache-cli --fork $WEB3_INFURA_ENDPOINT --networkId 999

For running the contract add-remove liquidity operations you should run deploy_upgradeable_contract_preprations script via:

brownie run scripts/ProxyScripts/deploy_upgradeable_contract_preprations.py

Here is a Demo for this script:

SwapDeploymentScriptDemo.mp4

Authors

License

MIT