A view
function modifier in solidity denotes a function used for reading data from the smart contract.
When we read data from the smart contract, no transaction is made and the gas-fee is not applied, since we're not making any changes to the blockchain.
solidity
function getAllWaves() public view returns (Wave[] memory) {
return waves;
}