A smart contract to:
- Fund the contract
- Add an EntranceFee
- Withdraw the money if you are the owner
- Convert sent money to USD
- Get ETH current price
- Deploy mocks
A python script to:
- Connect to a Blockchain
(Testnet, Mainnet)
- Get an account safely
- From a local or a forked local blockchain environment
- A real one via the config & .env file
- Pass the price feed address to our contract
- A real one if we are on a real network
- A mock one if we are on a local blockchain environment
- Deploy our contract
- Get an account safely
- From a local or a forked local blockchain environment
- A real one via the config & .env file
- Deploy mocks
- Fund our contract
- Withdraw the money from the contract
- Test if we can fund and withdraw money
- Test if only the owner can withdraw money
To run the code there are some requirements. You must install:
Install pipx by running the following on the command line: python -m pip install --user pipx
then python3 -m pipx ensurepath
For more information check: Install pipx
Install Brownie by running the following on the command line: pip install eth-brownie
For more information check: Install Brownie
This is the Lesson 6 of the freeCodeCamp.org tutorial: https://www.youtube.com/watch?v=M576WGiDBdQ with more comments.