Big Update: New Goerli Faucet Located Here. Kovan, Ropsten, and Rinkeby have been deprecated.
You'll need to verify via Twitter to get ETH & LINK. You can find Backup Faucets here.
Additionally, lesson 7 uses Chainlink VRF v1 instead of v2, you can find the docs for Chainlink VRFv1 here.
Welcome to the repository for the Ultimate Solidity, Blockchain, and Smart Contract - Beginner to Expert Full Course | Python Edition FreeCodeCamp course!
Code: https://awesomeopensource.com/project/PatrickAlphaC/simple_storage
uint256
, int256
, bool
, string
, address
, bytes32
Code: https://awesomeopensource.com/project/PatrickAlphaC/storage_factory
Code: https://awesomeopensource.com/project/PatrickAlphaC/fund_me
Code: https://awesomeopensource.com/project/PatrickAlphaC/web3_py_simple_storage
Code: https://awesomeopensource.com/project/PatrickAlphaC/brownie_simple_storage
brownie init
SimpleStorage.sol
to the contracts
folderbrownie compile
def main
is brownie's entry pointdevelopment
ganache
chain that it createsmain
functionaccounts
accounts[0]
: Brownie's "default" ganache accounts
accounts.load("...")
: Brownie's encrypted command line (MOST SECURE)
brownie accounts new <name>
and enter your private key and a passwordaccounts.add(config["wallets"]["from_key"])
: Storing Private Keys as an environment variable, and pulling from our brownie-config.yaml
dotenv: .env
to your brownie-config.yaml
and have a .env
filetransaction.wait(1)
test_simple_storage.py
assert
brownie test
test_updating_storage
brownie networks list
list index out of range
get_account()
networks.show_active()
brownie console
Code: https://awesomeopensource.com/project/PatrickAlphaC/brownie_fund_me
helpful_scripts.py
__init__.py
publish_source
)
ETHERSCAN_TOKEN
networks
in our brownie-config.yaml
test_can_fund_and_withdraw
pip install pytest
mainnet-fork
brownie networks add development mainnet-fork-dev cmd=ganache-cli host=http://127.0.0.1 fork='https://infura.io/v3/$WEB3_INFURA_PROJECT_ID' accounts=10 mnemonic=brownie port=8545
brownie test --network mainnet-fork
test_only_owner_can_withdraw()
gives below error if the selected network is Ganache UI::E ValueError: Execution reverted during call: 'VM Exception while processing transaction: revert'. This transaction will likely revert. If you wish to broadcast, include `allow_revert:True` as a transaction parameter.
Code: https://awesomeopensource.com/project/PatrickAlphaC/smartcontract-lottery
README.md
Lottery.sol
startLottery
block
keyword
block.difficulty
block.timestamp
keccack256
endLottery
returns (type variableName)
fulfillRandomness
override
deploy_lottery.py
get_account()
refactoredget_contract
contract_to_mock
Contract.from_abi
vrfCoordinatorMock
and adding mocksLinkToken
and Mocksstart_lottery
tx.wait(1)
your last transactionenter_lottery
end_lottery
test_get_entrance_fee
pytest.skip
(again)test_cant_enter_unless_started
test_can_start_and_enter_lottery
test_can_pick_winner_correctly
callBackWithRandomness
topics
Code: https://awesomeopensource.com/project/smartcontractkit/chainlink-mix
Code: https://awesomeopensource.com/project/PatrickAlphaC/erc20-brownie-py
deploy_token.py
helpful_scripts.py
*NOTE: This repo is now archived as kovan is no longer supported. You can still follow along with the learning, but know the code may not work the same on a different testnet.
Code: https://awesomeopensource.com/project/PatrickAlphaC/aave_brownie_py_freecode
get_weth.py
withdraw
aave_borrow.py
deposit
Code: https://awesomeopensource.com/project/PatrickAlphaC/nft-demo
SimpleCollectible.sol
createCollectible
_safeMint
deploy_and_create.py
AdvancedCollectible.sol
createCollectible
(Advanced)
tokenIdToBreed
setTokenURI
_isApprovedOrOwner
indexed
event keywordOPENSEA_URL
to helpful_scripts
create_collectible.py
create_metadata.py
get_breed
metadata_template
upload_to_ipfs
ipfs daemon
Code: https://awesomeopensource.com/project/PatrickAlphaC/upgrades-mix
Box.sol
BoxV2.sol
01_deploy_box.py
Note: This section is archived as kovan is now deprecated. If you're looking to learn more Full-stack, check out the full stack portions of the hardhat/javascript video.
Link to hardhat/javascript video with more full-stack examples: https://awesomeopensource.com/project/smartcontractkit/full-blockchain-solidity-course-js
Code: https://awesomeopensource.com/project/PatrickAlphaC/defi-stake-yield-brownie-freecode
DappToken.sol
TokenFarm.sol
tokenIsAllowed
addAllowedTokens
stakeTokens
issueTokens
getUserTotalValue
getUserSingleTokenValue
getTokenValue
setPriceFeedContract
unStakeTokens
deploy.py
test_set_price_feed_contract
test_stake_tokens
test_issue_tokens
create-react-app
Main.tsx
brownie-config
& build
folder to our UIYourWallet
supportedTokens
WalletBalance
ethersproject/units
BalanceMsg
approve
useContractFunction
useEffect
Shoutout to Matt for the help on the front end!
Be sure to check out project grant programs!
And make today an amazing day!