ContractManagerPlugin deploying to an external node

Hello fam!

I have set up the whole development environment, I program on my computer using Windows.

I have a VPS (Linux) with a running node, I have the contract runner configured.

Now the problem is, I want to program and compile on my Windows computer and then upload it to my node. The ContractManagerPlugin plugin only allows me to deploy to my local node (Windows).

How can I do it?

I cannot find this information in the documentation.

Thanks for your help!!!

The ContractManager, which is wrapped by the ContractManagerPlugin, only publishes the contract on the blockchain. For that it needs a running node and by default it uses a local node (this can be controlled by the properties contract.manager.serverAddress, etc.). But this is only the node which the ContractManager will use to do its work, not where the contract will be executed.

The contract is executed on a node which has a ContractRunner configured to execute for the account for which the contract was uploaded. This configuration should be done on the Linux VPS in your case. Read here for more details: Lightweight Contracts

So, the answer to your question is: your ContractRunner node should automatically pickup any contracts uploaded for the account (if it is configured correctly) after they are uploaded on the blockchain by the ContractManager (which can safely run on your local Win computer).

Thank you for your help.

In my case (Windows), to be more specific:

  • Access your path where Ardor is installed (C:/Users/user/Documents/Ardor).
  • Go to the /conf folder
  • Open the "nxt-default.properties" file
  • Search for "#### CONTRACT MANAGER ####".
  • Configure IP, HTTPS (if needed) and the secret phrase.
  • Compile and run with ContractManagerPlugin

This should do the trick!
Thank you very much for the hints!

Only one correction: don't edit nxt-default.properties directly. Create a separate nxt.properties file only with your changes. See here Nxt-default properties configuration file - ArdorDocs

1 Like

You're right, much better! I forgot :sweat_smile: