Ethereum: Understanding zksync System Contracts
and Recompilaty
Regarding the implementation and implementation of intelligent ETHEREUM contracts, developers must choose between two popular approaches: Symbol System Contracts (ZS) and EVM pre -complex. In this article, we deepen the differences between the two approaches and examine when each of them is appropriate.
What are the contract systems?
The contracts of the Zksynched system are a new standard for the implementation of ETREEM intelligent contracts introduced in June 2021. Its aim is to improve the performance and safety of synchronized implementation with the introduction of more efficient and more robust way of performing the code in the code code under the block chain.
This is how it works:
- The contracts of the ZS are used by EVM (virtual machine Ethereum) within the bonnet as well as other Ethereum contracts.
- However, the contracts of the ZS have another layer of abstraction. They are basically pre -folded assemblies that contain all the necessary code to perform in the block chain.
- When the developer wants to implement a contract with a synchronized ZK, you can use a tool such as Zksync or Hardhat to create a ZS Contron set from his code.
What are the EVM pre -complaints?
Pre-complications, also known as “systemic contracts”, are similar to the contract contracts of the ZK-SYNC system, but instead work on EVM. They allow developers to compile and implement smart contracts from Ethereum directly into the block chain without the need for a separate assembly process.
This is how it works:
- When a developer wants to implement a contract, you can use a tool such as Web3.js or truffle to create EVM overcoming from his code.
- Predcompilators are then placed in a decentralized storage solution, such as interplanetary archives (IPFS).
- In order to make a blockchain contract, the developer must connect the advance sale with the ZS contract with a tool such as Zksync or Hardhat.
Key differences:
These are the main differences between the contracts of the synchronized system with ZK and EVM Prep -Complexes:
| | ZK-SYNC System Contrated with EVM (System Contracts)
| — | — | — |
|
Context of implementation | Requires a separate assembly process it works at the top of the EVM
|
Abstraction of code | Another layer of abstraction integrated into the contract native of EVM under the hood
|
Save requirements | Requires separate storage solutions (such as ZS contracts) is not required separate storage solutions
When to choose contracts to a synchronized system with ZK?
ZK-Sync contracts are a good choice when:
- You want more control over the context of performing and abstraction code.
- Your contract requires additional characteristics or optimization that cannot be achieved through the preliminary EVM complex.
When to choose the EVM pre -compete (system contracts)?
Reworked EVM (system contracts) are a good choice when:
- You must implement your contract directly into a blockchain without a separate assembly process.
- Your contract is small in size and requires minimal optimization.
To conclude, although the contracts on the synchronized system with ZK and EVM prewarms may be used to implement the EThereum intelligent contracts, they have clear differences in terms of context of implementation, code abstraction and storage requirements. By understanding these differences, developers can choose an approach that best suits their needs and goals.