HelloStarknet
contract on your very own local instance of Starknet.
--seed
option is used to force consistent addresses of predeployed account (see more details below).hello_starknet
directory created in Generating HelloStarknet
and run:
sncast account import
, see the Starknet Foundry documentation.HelloStarknet
locallyHelloStarknet
contract, run:
class_hash
is the contract’s class hash, which can then be used to deploy an instance of it.
HelloStarknet
locallyHelloStarknet
declared, you can now deploy an instance of it by running:
--salt
option is used to force a consistent address for the deployed contract.HelloStarknet
locallyHelloStarknet
is deployed, you can interact with via its functions by either calling or invoking them.
Calling is used for read functions that don’t modify their contract’s storage, and allows querying a smart contract function without sending a transaction. For example, you can call HelloStarknet
’s get_balance
function by running:
HelloStarknet
’s increase_balance
function by running:
get_balance
again. If all goes well, the result should resemble the following ():