Smart Contracts
Smart contracts that provide functionality for the Züs System
Last updated
Smart contracts that provide functionality for the Züs System
Last updated
Smart contracts are self-executing programmatic contracts listing the functionality and the terms of service between the clients and Züs systems.
In Züs, we have actively 3 smart contracts:
The Storage smart contract is responsible for handling all functions related to file storage on the Züs network. This includes creating and managing allocations, locking and unlocking stake pools for storage providers, functions related to storage providers (blobbers and validators), write markers and challenges.
The Miner smart contract is responsible for handling all functions related to providers that contribute to block generation and consensus (miners and sharders). This includes addition, health signals, termination, fees, rewards, staking and global settings of those types of providers.
The Authorizer smart contract is responsible for handling all functions related to Bridge protocol and inter-network tokenomics between Züs Network and Ethereum network. This includes addition, staking and management of Authorizers in addition to mint and burn functions.
Those are smart contracts that are deployed by Züs team on the Ethereum network. They're used to fulfill the operations needed to exchange Züs tokens (ZCN) with ERC-20 (we call it the Bridge Protocol).
In order to communicate with the smart contracts, you need to:
Submit a transaction to the blockchain, stating the smart contract and the function name you need, and providing the inputs needed for the function.
The transaction need to be signed by the client's private key as it will be verified by the network using the client's public key.
After submitting the transactions, it will then be selected by the miners to be part of one of the blocks and then be processed.
After processing the transaction, the network will generate a confirmation for the transaction, inclusing its status and output. This confirmation will be persisted by the sharders.
The client should communicate with the sharders in order to get confirmation for their transaction, to make sure it's processed and view its status and output.
Check Using the Network > Smart contracts for full listing of the possible functions and the structure of the transaction.
Each smart contract is represented by a fixed address on the network, which is used as value for the to_client_id
field of the transaction. The addresses of the smart contracts are as follows:
Storage SC
6dba10422e368813802877a85039d3985d96760ed844092319743fb3a76712d7
Miner SC
6dba10422e368813802877a85039d3985d96760ed844092319743fb3a76712d9
ZCN SC
6dba10422e368813802877a85039d3985d96760ed844092319743fb3a76712e0