Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Latest commit

 

History

History
30 lines (16 loc) · 1.66 KB

deploy-and-call-realms.md

File metadata and controls

30 lines (16 loc) · 1.66 KB

Deploy and Call Realms

There are two methods of deploying and calling realms:

  1. With a blockchain: You can use the subcommands of gnokey such as addpkg to deploy a realm to the Gnoland blockchain and maketx call to call available realms in the Gnoland blockchain.
  2. Without a blockchain: You can use the gno, a CLI which allows you to use the GnoVM in a local environment (ie, without a blockchain). This method is fast and allows development patterns such as TDD; however, it does not facilitate the capability for external parties to participate in testing since everything is done locally.

This section covers how to deploy and call realms with the first method: With a blockchain.

Deploy

Use the addpkg, a subcommand of gnokey, to publicly deploy realms.

Call

There are two ways to call your deployed function using gnokey.

Method 1. gnokey make tx call

This method will execute a transaction to call a function in a realm. Note that this method is used for state-changing functions as it consumes gas.

Method 2. gnokey query

This method is only for viewing the state of realms. Use this method for calling non-state-changing functions as it does not consume any gas.