Chainstack offers Tezos as dedicated nodes only. You can request a dedicated node through the contact form.
This tutorial guides you through developing, originating, and interacting with a simple decentralized fund smart contract on Tezos.The origination and the interaction with the contract for tutorial purposes is done on Ghostnet, which is a testnet.The simple fund contract does the following:
The contract can be funded in any amount of tez by anyone on the network.
1 tez at a time can be withdrawn from the funded contract by anyone on the network.
where ACCOUNT_ADDRESS — the account you generated and funded previously.Once the contract is originated, you will see the contract address in Originated contracts.Example:
New contract KT1NSJSJjV5HHi3dgvwDNNs72hjCe9DsYvYV originated.
You now have a working contract on Ghostnet.Write down the contract address as you will need it later to interact with it through a web app and the Temple wallet.
You can now fund the contract using the Tezos client.Get the contract parameter for the deposit function to pass to the Tezos client.Get the parameter for Deposit:
octez-client transfer 10 from ACCOUNT_ADDRESS to simplefund --arg "(Left Unit)" --burn-cap 1
where ACCOUNT_ADDRESS — the account you generated and funded previouslyOnce the operation is included in a block, check the contract balance by querying the storage:
$ octez-client get contract storage for simplefund10000000
This tutorial guided you through the basics of creating a contract in LIGO and originating the contract on a Tezos network.You were also able to interact with the contract through the CLI with the Tezos client and through a web app with the Temple wallet.This tutorial uses testnet, however, the exact same instructions and sequence will work on the mainnet as well.