Constructor functions are used to set state variables in the contract storage of a contract that is being deploy. But realize that a facet doesn’t read or write to anything in its own contract storage — it only reads and writes state variables to a diamond proxy’s contract storage. A diamond proxy contract is a single source for all state variable data.
Share this post
Constructor Functions Don't Work in Facets
Share this post
Constructor functions are used to set state variables in the contract storage of a contract that is being deploy. But realize that a facet doesn’t read or write to anything in its own contract storage — it only reads and writes state variables to a diamond proxy’s contract storage. A diamond proxy contract is a single source for all state variable data.