Interact with Server

Let's try it out!

Simply run your cli with the read-count command, the server address and the path to the contract directory as follows:

cargo run -- read-count "https://node.essential.builders" "../contract"

You should see something like:

Current count is: 1

Your count is probably different.
Are you one of the first people to do this tutorial or is the count already much higher?

Now let's increment the count:

cargo run -- increment-count "https://node.essential.builders" "https://node.essential.builders" "../contract"

The increment-count command requires the builder and nodes api address. They just happen to be the same in this case.

And check the count again:

cargo run -- read-count "https://node.essential.builders" "../contract"

If you don't see the count go up then it's probably because the solution hasn't been included in a block yet.
Just wait a few seconds and try reading again.