This file will list issues/updates by timestamp. If you have an issue that you don't see here, please make an issue on this repo.
- If you have any issues with a faucet, please try another testnet. You'll have to update some contract addresses based on the testnet you're working on. You can find the most up to date faucets here.
- If the Rinkeby faucet isn't working, you can use a kovan faucet, just be sure to use Kovan Etherscan and Kovan in your Metamask!
- Big Update: New Rinkeby Faucet Located Here
- You can find Backup Faucets here
If you see something along the lines of:
ParserError: Source "OpenZeppelin/openzeppelin-contracts@3.4.0/contracts/access/Ownable.sol" not found: File not found.
import "@openzeppelin/contracts/access/Ownable.sol";
In your vscode, these and be safely ignored. However you can also add to your settings to ignore these.
- Create a
.vscode
folder at the root of your project. - Create a file called
settings.json
- Add the following code:
{
"solidity.remappings": [
"@chainlink/=/Users/patrick/.brownie/packages/smartcontractkit/chainlink-brownie-contracts@0.2.2",
"@openzeppelin/=/Users/patrick/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.3.2"
]
}
Or whatever version your @chainlink
and @openzeppelin
contracts need. For example:
- In some integration tests, we do something like
time.sleep(60)
. Sometimes, you'll have to do much longer, we've had reports go up totime.sleep(300)
. So, if you want to try that, go get a coffee break while your integration test runs!
- 2:37:05 Kovan vs Rinkeby
- Our
FundMe.sol
needs to be deployed to the rinkeby chain to work, but if you go to try the price feeds from the Chainlink docs using the remix link, that one has the kovan price feeds in it, so needs to be deployed to kovan. - If you want to test the price feeds from the video using the Chainlink docs remix link, you'll need to follow the steps to get kovan ETH.
- Our
- 3:43:52 Installing solcx version 0.6.0
- In the video, we forgot to do 2 things in order to compile our solidity code:
- Import
install_solc
, so we need to change this line:from solcx import compile_standard
- To this line:
from solcx import compile_standard, install_solc
- And then, we need to add a line right before we run the
compile_standard
code:install_solc("0.6.0")
- Import
- In the video, we forgot to do 2 things in order to compile our solidity code:
- 4:00:00 Issue with ganache and web3.py
- As of
5.25.0
of web3.py, we now need to add gasPrice to our transactions with a local ganache chain. - Adding
"gasPrice": w3.eth.gas_price,
should fix your issue in the transactions.
- As of
Full Example:
transaction = SimpleStorage.constructor().buildTransaction(
{
"chainId": chain_id,
"gasPrice": w3.eth.gas_price,
"from": my_address,
"nonce": nonce,
}
)
- 3:56:20 Colorized Brackets.
-
- In the video, we use events exclusivly to test our contracts, however, we could have also used
tx.return_value
to get the return value of a function. - However, it's still best practice to learn how to use events, especially when updating mappings!
- In the video, we use events exclusivly to test our contracts, however, we could have also used
-
- In the video,
starting_balance_of_account
andbalance_of_lottery
are retrieved AFTERlottery.endLottery()
- For correctness those 2 statements should be run BEFORE
lottery.endLottery()
- The tests pass because
starting_balance_of_account == account.balance()
(L81) andlottery.balance()
is already 0 - This is a subtle bug in the test, which also showcases a problem with tests - we have no one to test the tests ;) Still, having tests is better than not having them, just don't put all your assurances into them
- In the video,
- The Aave testnet site has moved from
https://testnet.aave.com
tohttps://staging.aave.com
and some of the functionality is lost :( - For our
repay_all
function, we originally had:
repay_all(AMOUNT, lending_pool, account)
But it should be:
repay_all(Web3.toWei(amount_dai_to_borrow, "ether"), lending_pool, account)
We want to pay back the DAI not the ETH! Just remember, you'll still have a vveerrrryyyy small amount of DAI borrowed because of interest. If you see something with an E
in it, you did it right!