Page 97 of the book says this:
As we have seen, libraries contracts do not have storage. Therefore, they can’t hold state
variables (state variables that are non-constant).
External functions in libraries can take storage arguments and therefore modify the storage of contracts. An example of this is in the Solidity documentation here: https://docs.soliditylang.org/en/v0.8.30/contracts.html#libraries
With the contract standards ERC-8042 and ERC-7201 libraries can define structs in storage and modify them in storage. This is done extensively in the Compose smart contract library: https://github.com/Perfect-Abstractions/Compose
Page 97 of the book says this:
External functions in libraries can take storage arguments and therefore modify the storage of contracts. An example of this is in the Solidity documentation here: https://docs.soliditylang.org/en/v0.8.30/contracts.html#libraries
With the contract standards ERC-8042 and ERC-7201 libraries can define structs in storage and modify them in storage. This is done extensively in the Compose smart contract library: https://github.com/Perfect-Abstractions/Compose