Technical Architecture
Last updated
Last updated
Synthetix V3 consists of a collection of separate system. Each system includes a UUPS proxy contract, an automatically generated router contract, a series of module contracts, and a series of storage library contracts.
Data runs a risk of corruption if a storage library is upgraded in an invalid way. (For example, rearranging the order of items in the struct will cause unintended side-effects.)
Router contracts are automatically generated using custom tooling which can be found in the . See the README there for more information.
Note that does not yet have support for this proxy architecture when generating Read/Write Contract user interfaces. Instead, you can use a similar tool in the .
Systems use a series of storage libraries, analogous to models in MVC frameworks. These contracts typically load and save a struct from a specified storage slot. See the as an example.
To protect against this, in the continuous integration pipeline.
Storage libraries are also not straightforward to interact with in unit testing. To help resolve this challenge, the plug-in also includes a which automatically creates a smart contract with getter and setter methods for the specified storage library.