Categorygithub.com/classzz/go-classzz-v2
modulepackage
1.2.2
Repository: https://github.com/classzz/go-classzz-v2.git
Documentation: pkg.go.dev

# README

go-classzz-v2

The official version of the Te Waka cross-chain protocol was launched. At that time, users can use CzzSwap to exchange assets on ETH, HECO, and BSC at will. The CZZ mainnet currency will also appear in the form of ECZZ, HCZZ, and BCZZ on ETH, HECO, and BSC, and will continue to land on these ecological Dex.

Developers can also use the open source API provided by the Class ZZ community to embed the Te Waka protocol in their applications. Class ZZ (CZZ) is the world's first public chain to realize decentralized cross-chain transactions. It realizes cross-chain transactions through the native token cross-chain protocol (ie Te Waka), and is the "cross-border ship" of the blockchain world.

The Te Waka protocol is completely open source and decentralized, enabling Token to switch arbitrarily on the mainnet supported by the protocol. At present, the Te Waka protocol has successfully supported cross-chain transactions of assets on the ETH, HECO, and BSC chains, and will continue to support cross-chain transactions of public chains such as Polkadot, Solana.

Building the source

Building gczz requires both a Go (version 1.14 or later) and a C compiler. You can install them using your favourite package manager. Once the dependencies are installed, run

make gczz

or, to build the full suite of utilities:

make all

The execuable command gczz will be found in the cmd directory.

Running gczz

Going through all the possible command line flags is out of scope here (please consult our CLI Wiki page), also you can quickly run your own gczz instance with a few common parameter combos.

Running on the Classzz main network

$ gczz console

This command will:

  • Start gczz with network ID 61 in full node mode(default, can be changed with the --syncmode flag after version 1.1).
  • Start up Gczz's built-in interactive console, (via the trailing console subcommand) through which you can invoke all official web3 methods as well as Gczz's own management APIs. This too is optional and if you leave it out you can always attach to an already running Gczz instance with gczz attach.

Running on the Classzz test network

To test your contracts, you can join the test network with your node.

$ gczz --testnet console

The console subcommand has the exact same meaning as above and they are equally useful on the testnet too. Please see above for their explanations if you've skipped here.

Specifying the --testnet flag, however, will reconfigure your Gczz instance a bit:

  • Test network uses different network ID 62
  • Instead of connecting the main Classzz network, the client will connect to the test network, which uses testnet P2P bootnodes, and genesis states.

Configuration

As an alternative to passing the numerous flags to the gczz binary, you can also pass a configuration file via:

$ gczz --config /path/to/your_config.toml

To get an idea how the file should look like you can use the dumpconfig subcommand to export your existing configuration:

$ gczz --your-favourite-flags dumpconfig

Running on the Classzz singlenode(private) network

To start a g instance for single node, run it with these flags:

$ gczz --singlenode  console

Specifying the --singlenode flag, however, will reconfigure your Gczz instance a bit:

  • singlenode network uses different network ID 63
  • Instead of connecting the main or test Classzz network, the client has no peers, and generate shard block without committee.

Which will start sending transactions periodly to this node and mining fruits and pow blocks.

# Packages

Package accounts implements high level Classzz account management.
No description provided by the author
Package common contains various helper functions.
Package consensus implements different Classzz consensus engines.
No description provided by the author
No description provided by the author
Package core implements the Classzz consensus protocol.
No description provided by the author
Package czz implements the Classzz protocol.
Package czzclient provides a client for the Classzz RPC API.
Package czzdb defines the interfaces for an Classzz data store.
Package czzstats implements the network stats reporting service.
Package event deals with subscriptions to real-time events.
Package graphql provides a GraphQL interface to Classzz node data.
Package les implements the Light Classzz Subprotocol.
Package light implements on-demand retrieval capable state and chain objects for the Classzz Light Client.
Package log15 provides an opinionated, simple toolkit for best-practice logging that is both human and machine readable.
Go port of Coda Hale's Metrics library <https://github.com/rcrowley/go-metrics> Coda Hale's original work: <https://github.com/codahale/metrics>.
Package miner implements Classzz block creation and mining.
Package node sets up multi-protocol Classzz nodes.
Package p2p implements the Classzz p2p network protocols.
No description provided by the author
Package rlp implements the RLP serialization format.
Package rpc implements bi-directional JSON-RPC 2.0 on multiple transports.
No description provided by the author
Package tests implements execution of Classzz JSON tests.
Package trie implements Merkle Patricia Tries.

# Variables

NotFound is returned by API methods if the requested item does not exist.

# Structs

CallMsg contains parameters for contract calls.
FilterQuery contains options for contract log filtering.
SyncProgress gives progress indications when the node is synchronising with the Classzz network.

# Interfaces

ChainReader provides access to the blockchain.
ChainStateReader wraps access to the state trie of the canonical blockchain.
ChainSyncReader wraps access to the node's current sync status.
A ContractCaller provides contract calls, essentially transactions that are executed by the EVM but not mined into the blockchain.
GasEstimator wraps EstimateGas, which tries to estimate the gas needed to execute a specific transaction based on the pending state.
GasPricer wraps the gas price oracle, which monitors the blockchain to determine the optimal gas price given current fee market conditions.
LogFilterer provides access to contract log events using a one-off query or continuous event subscription.
PendingContractCaller can be used to perform calls against the pending state.
A PendingStateEventer provides access to real time notifications about changes to the pending state.
A PendingStateReader provides access to the pending state, which is the result of all known executable transactions which have not yet been included in the blockchain.
Subscription represents an event subscription where events are delivered on a data channel.
TransactionReader provides access to past transactions and their receipts.
TransactionSender wraps transaction sending.