raiden
raiden copied to clipboard
Add a `raiden contracts` subcommand
trafficstars
Abstract
For support/debugging as well as orchestrating raiden nodes, it can be very helpful to query the configured contract addresses of raiden. Similar to the raiden version command, we should have a raiden contracts command, that returns a machine readable mapping (e.g. json) of the contracts that are used by this version.
Motivation
For users / developers of https://github.com/raiden-network/raiden-wizard I want to provide a painless way of reclaiming all funds associated with a raiden node. For this, we will need to know several contract addresses.
Specification
# Usage:
raiden contracts --environment-type [production (default)|development]
# Example output:
{
"chain": "mainnet",
"contracts": {
"SecretRegistry": "0x42b5c121F761975B0F9C0fc1B53e08150567c225",
"TokenNetworkRegistry": "0x2F88F8261819C4d63346804A17Aa93c35Cc79D79",
"ServiceRegistry": "0x0fedBC2ef6C33030BE69208c22Bc107aF37A8AfC",
"UserDeposit": "0x15ac371adE21c4F31Da36A4Cf9A0ef35aFdE7a9F",
"MonitoringService": "0x89ffd3fe894FD3F7f89EB814712344596220c4c0",
"OneToN": "0x81DC9eb82b1a45354BA1aC15332bAA21cc8C599D"
}
}
Backwards Compatibility
No implications for backwards compatibility.