Solidity access modifiers are used to provide access control in Solidity.
There are four types of access modifiers available in Solidity, listed as follows:
- Public: Accessible from this contract, inherited contracts, and externally
- Private: Accessible only from this contract
- Internal: Accessible only from this contract and contracts inheriting from it
- External: Cannot be accessed internally, only externally