Now that Foundry is installed, we can build out the functionality of our smart contract written in Solidity. We'll create various functions that allow you to increment, decrement, and read a number whose state is kept in your smart contract.
All of the functions will have different visibility modifiers and types that constrain the behavior of your functions. We'll create our own custom error that is thrown whenever you step outside the bounds of your intended functionality.