Allows people to send me money. And... yeah!
A toy project to practice solidity and blockchain development using Foundry framework.
Foundry is a super nice and easy tool built in Rust.
$ forge build
Some dependencies might be needed first. To install run the following in the project directory:
$ forge install smartcontractkit/chainlink-brownie-contracts@0.8.0 --no-commit
$ forge install Cyfrin/foundry-devops --no-commit
Run all the test cases.
$ forge test
To run a specific test:
$ forge test --mt <test_case_name>
To add extra visibility and debug output, you can -v
| -vv
| -vvv
$ forge test --mt <test_case_name> -vvv
$ forge fmt
This command creates a snapshot for the amount of gas used by your functions and test cases as well.
$ forge snapshot
Use this tool to fire up you local chain for testing and experimentation.
$ anvil
$ forge script script/DeployFundMe.s.sol:DeployFundMe --rpc-url $(SEPOLIA_RPC_URL) --private-key $(PRIVATE_KEY) --broadcast --verify --etherscan-api-key $(ETHERSCAN_API_KEY) -vvv
You can also use the included Makefile
to do deploy. Make sure you include
your RPC URLs and the neccessary keys in your .env
file.
Example:
$ make deploy-sepolia