A template to deploy/call smart contracts on Cronos Cassini using Brownie.
You need to grab Brownie before using this project.
pip3 install --user pipx
python3 -m pipx ensurepath
pipx install eth-brownie
- Get TCRO from https://cronos.crypto.org/faucet
- Create
.env
file in the root directory of this template project - Get the private key from metamask and add it into
.env
export PRIVATE_KEY='0xxxxxxxxxxxxxxxxxxxxxxxxxx'
- Add cassini network
brownie networks add Ethereum cassini host=https://cronos-testnet-3.crypto.org:8545 chainid=338
- Run
deploy.py
to deploy contacts under contracts folder
brownie run scripts/deploy.py --network cassini # it would deploy to cassini testnet!
- Call
fund.py
to transfer TCRO to the contract we deployed in last step. Modify the TCRO value infund.py
if you would like to.
brownie run scripts/fund.py --network cassini
- Call
withdraw.py
to get all TCRO back
brownie run scripts/withdraw.py --network cassini
- Just add your solidy contracts or modify the original contracts in contract folder and modify the
deploy.py
in scripts folder. - Run
brownie run scripts/deploy.py --network cassini