raiden-contracts icon indicating copy to clipboard operation
raiden-contracts copied to clipboard

Chain deployment script commands

Open loredanacirstea opened this issue 6 years ago • 8 comments

Currently, for setting up a testnet, you need to run:

python -m raiden_contracts.deploy raiden
python -m raiden_contracts.deploy token
python -m raiden_contracts.deploy register

As suggested by @kelsos , it would be nice to chain the commands. However, we need to make sure the deployment functionality is clear for production vs. development.

loredanacirstea avatar Dec 14 '18 16:12 loredanacirstea

I guess the most sensible way is to keep

python -m raiden_contracts.deploy token

as a separate command, and combine

python -m raiden_contracts.deploy raiden
python -m raiden_contracts.deploy register

pirapira avatar Feb 11 '19 16:02 pirapira

Now I'm not sure. register can be called multiple times after raiden.

pirapira avatar Mar 05 '19 15:03 pirapira

The most annoying thing is that we have to copy over addresses from stdout of one command to the command line argument of another invocation. What if register command reads the address of TokenNetworkRegistry from the deployment file?

pirapira avatar Mar 05 '19 15:03 pirapira

Since I needed a script to deploy the contracts easily on a private testnet I ended up doing this https://github.com/kelsos/test-environment-scripts/blob/master/scripts/deploy_testnet.py

While I haven't updated it for a while, at least it helps me get the private network setup on a single step.

kelsos avatar Mar 05 '19 15:03 kelsos

Maybe something like this would work?

python -m raiden_contracts.deploy token ... | python -m raiden_contracts.deploy register --token-address - ...

--token-address - says "use the standard input as the token address".

pirapira avatar Mar 05 '19 16:03 pirapira

Maybe click’s command chaining could help you here? http://click.palletsprojects.com/en/7.x/commands/#multi-command-pipelines

ulope avatar Mar 05 '19 21:03 ulope

Now it's becoming fun.

pirapira avatar Mar 05 '19 21:03 pirapira

This should wait till https://github.com/raiden-network/raiden-contracts/issues/963 is done.

pirapira avatar May 28 '19 09:05 pirapira