Confusion on tool chain for development

I have a node running on mainnet, but I’m interested in developing a smart contract. The piggyBank tutorial runs without errors, so there’s that.

However, when I go to Preparation on testnet, I have the following questions:

  1. How can I restart my node to include a testnet as well (MacOS)?
  2. The Downloads section of the documentation exists for mainnet as well as testnet. Are these really different tools? Ie, I have the mainnet Desktop Wallet (incl. Ledger app), I have the mainnet Concordium-client, cargo-concordium, etc. If I need to download separate testnet installs for these apps, how would I keep them separate?

In summary: I have a mainnet setup running, but in doubt what needs to be done to develop a smart contract on testnet.

Hi @sderuiter

That’s great to hear. Welcome aboard the Concordium smart contract ship! :wink:

  1. If you run the app Concordium Node State Testnet, then a testnet node should start running.
    • If you want the testnet node to run on startup (or show up on the dashboard), then the easiest solution is to run the installer again and select that option. The chain data won’t be overwritten by reinstalling, but the service files will be. So if you manually edited some settings in them, you should back them up before installing or simply redo the changes after the install. They are located in /Library/Concordium\ Node/LaunchDaemons/
    • The testnet node will need to catch up before you can deploy contracts. This might take a day or two depending on the hardware of your computer.
  2. I can see that it is a bit confusing. I apologize for that. Most of the tools do not have a separate testnet version. The exceptions are the wallets, which communicate with a specific testnet or mainnet service that we run. So there are different versions of those.

Once your testnet node has caught up, the steps you need to follow are:

  1. Download and install the testnet mobile wallet.
  2. Create an account in the testnet mobile wallet (concordium-client only supports the mobile wallet accounts at the moment).
  3. Export your testnet accounts and send the file to your computer.
  4. Import the export file from step 3 with concordium-client
  5. Deploy your contract on testnet with concordium-client.
    • concordium-client communicates with the node via its gRPC interface.
    • By default concordium-client will use, which is the default for a local mainnet node.
    • The mac testnet node exposes its gRPC interface on by default.
    • To use the testnet node with concordium-client, use: concordium-client --grpc-ip --grpc-port 10001 module deploy .... (The --grpc-ip argument can be omitted if you are running the node locally :blush:).

I hope this clarifies it. Let us know if you run into any other problems.

Best regards,

1 Like