Skip to content

Latest commit

 

History

History
30 lines (16 loc) · 1.59 KB

deploy-and-call-realms.md

File metadata and controls

30 lines (16 loc) · 1.59 KB

Deploy and Call Realms

There are two methods of deploying and calling realms.

  1. With the 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 gno, which allows you to use the GnoVM without a blockchain in a local environment. This method is fast and allows you to use development patterns such as TDD. However, it does not facilitate the capability for external parties to participate in testing since it's done locally.

This section covers how to deploy and call realms with the first method - With the 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.