Skip to main content

Submitting your first Transaction

If you have deployed a contract to a local node or are connecting to a remote Mazzaroth node the main way to interact with a channel is by submitting transactions.

A Transaction can be submitted as an http request that includes a signed payload containing the transaction data. This can be done more easily by using either the m8 CLI or the Mazzaroth Wallet.

Using m8

m8 is a command line tool that lets you interact with Mazzaroth nodes. If you deployed your own contract you should have already installed this tool.

Otherwise, visit the repo to find latest releases or install instructions and check the tutorial on deploying your first contract for instructions on configuring m8 locally.

To submit a transaction with m8 simply uses the channel exec tx command:

m8 channel exec tx --fn hello

The name of the function to execute is provided with the --fn flag and optional arguments can be passed with the --args flag.

This command will automatically use the active channel address and id from your m8 config file and will sign the transaction using your private key. You can optionally override the default values if you need to target a different channel.

Using Mazzaroth Wallet

The Mazzaroth Wallet is a desktop software application that allows you to store, send, and receive your Mazzaroth digital assets. Mazzaroth Wallet takes care of storing your private keys and keeping your digital assets secure and accessible.

To get started install and start the Mazzaroth Wallet. You will need to create an account and import or generate keys to use. The wallet will walk you through these steps on first use.

After setup you must add a channel. The channel name can be anything, but the address must match the url of the Mazzaroth Node you wish to target with transactions. The Channel ID must also match the configured ID of the Mazzaroth Node which by default will be all 0s if testing locally for example: 0000000000000000000000000000000000000000000000000000000000000000.

Once the channel is added you can select it in the Execute tab and use the drop down fields to select the type of transaction as well as the function name. Functions and their arguments are populated automatically by the deployed ABI. If you do not see values here make sure you have deployed your contract to the node.

Simply fill in the values for the arguments and click submit. For readonly transactions you should get a result immediately. For write transactions you will need to check the transactions list to wait for a receipt and inspect the return value.