There are two methods of deploying and calling realms:
- With a blockchain: You can use the subcommands of
gnokey
such asaddpkg
to deploy a realm to the Gnoland blockchain andmaketx call
to call available realms in the Gnoland blockchain. - 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.
Use the addpkg
, a subcommand of gnokey
, to publicly deploy realms.
There are two ways to call your deployed function using gnokey
.
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.
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.