I made a backend for a Golang site. Now I want to try running the command “dfx canister --network ic call <canister_id> greet levi” in my backend. Are there canisters for testing on the network now?
canister “Hello world” will be enough
The question is still relevant! Help me please
You could run a simple greet canister locally and call that, or is there something in particular you were looking to test?
How are you oriented on this flow chart (“Developer workflow”)?
In particular, have you deployed your canister, and gotten an ID, or not?
If so, then doing dfx canister call
is the next step. Otherwise, the canister for testing is your canister, and you’d deploy it next, either locally or to the ic network, as in your call
command.
For testing basic functionality of a backend (and without using or needing a frontend), I recommend a local deployment first, and minimal other things (no II, no wallet). I also recommend scripting tests with ic-repl. There is an example of doing so here and here as well as the ic-repl repo.
I have done tests on a local canister, now I want to call the canister that is online(network ci) with the command “dfx canister --network ic call <canister_id> greet levi”.
At the moment there is a canister on the network that I can contact using this command?
I need this to understand if I can make requests to the methods of my canister on the network from my backend and understand what is needed for this.
Thanks in advance for your reply! Thanks to you, it became easier for me to understand Dfinity and Motoko!
I have done tests on a local canister, now I want to call the canister that is online(network ci) with the command “dfx canister --network ic call <canister_id> greet levi”.
At the moment there is a canister on the network that I can contact using this command?
I need this to understand if I can make requests to the methods of my canister on the network from my backend and understand what is needed for this.
Thanks in advance for your reply! Thanks to you, it became easier for me to understand Dfinity and Motoko!
There is not, IIUC. Not until you do dfx deploy
, following instructions here.
In particular, you’d specify deployment on the ic
network, and you’d need to have some balance of ICP associated with your development Principal ID (try dfx identity get-principal
) in order to do the deploy
, IIUC.
Getting the cycles / ICP onto that Principal ID is not documented in the SDK docs, AFAIK.
Only hold off on deploying to the network until you see an announcement about generally available public application networks. Coming soon!