^0.8.0 Solidity compatible proxiable flexUSD source-code, testing and compatibility focused.
This repository primarily requires a working python
environment, with verion 3.7.2 or above.
Assuming python
command on your local device is set to the correct version, we will use python
in the command line examples instead of python3
(and pip
instead of pip3
)
The preferred package manager for the reporitory is poetry
To install poetry
on your local environment, run the following command on your Terminal.
pip install -U poetry
Once poetry is installed, locate to the root directory of this folder and allow poetry to install project dependencies.
poetry install
This will automatically install these projects for your local environment
- eth-brownie A Python-based development and testing framework for smart contracts targeting the Ethereum Virtual Machine.
- pytest The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
- When
eth-brownie
is installed, you will also automatically installganache-cli
, an NPM package for local hosting of Ethereum Virtual Machine (EVM)
You can run all tests at the same time using the following command on your shell.
$ pytest tests/*
... results
Or run individual tests as such
$ pytest tests/transactions.py
... results
$ pytest tests/transactions.py -k test_show_accounts
... result
Local Deployment for interactive usage
brownie run deploy_flexusd -i
Prepare wallet yaml file in root folder with
python generate-wallet.py --filename wallet.[network]
Deploy on desired network
brownie run deploy_flexusd --network [network]
To publish sourcecode for verification on Chain Explorer, ie. etherscan, you must first create a flatten sourcecode with the following command
brownie run flatten
-
FlexUSD (proxy contract): 0x7b2B3C5308ab5b2a1d9a94d20D35CCDf61e05b72
-
FlexUSDImplV2 (logic contract): 0x95a9Ae9323C04407c69ec603b9ffcCa18BAf6b5A