pub enum SafeModuleSubcommands {
Create {
network_provider: NetworkProviderArgs,
local_identity: IdentityFileArgs,
node_address: Option<String>,
admin_address: Option<String>,
threshold: u32,
allowance: Option<f64>,
hopr_amount: Option<f64>,
native_amount: Option<f64>,
private_key: PrivateKeyArgs,
manager_private_key: ManagerPrivateKeyArgs,
},
Migrate {
network_provider: NetworkProviderArgs,
local_identity: IdentityFileArgs,
node_address: Option<String>,
safe_address: String,
module_address: String,
allowance: Option<f64>,
private_key: PrivateKeyArgs,
manager_private_key: ManagerPrivateKeyArgs,
},
Move {
network_provider: NetworkProviderArgs,
local_identity: IdentityFileArgs,
node_address: Option<String>,
old_module_address: String,
new_safe_address: String,
new_module_address: String,
private_key: PrivateKeyArgs,
manager_private_key: ManagerPrivateKeyArgs,
},
Debug {
network_provider: NetworkProviderArgs,
local_identity: IdentityFileArgs,
node_address: Option<String>,
safe_address: String,
module_address: String,
},
}
Expand description
CLI arguments for hopli safe-module
Variants§
Create
Create safe and module proxy if nothing exists
Fields
network_provider: NetworkProviderArgs
Network name, contracts config file root, and customized provider, if available
local_identity: IdentityFileArgs
Arguments to locate identity file(s) of HOPR node(s)
allowance: Option<f64>
Allowance of the channel contract to manage HOPR tokens on behalf of deployed safe
hopr_amount: Option<f64>
The amount of HOPR tokens (in floating number) to be funded to the new safe
private_key: PrivateKeyArgs
Access to the private key, of which the wallet either contains sufficient assets as the source of funds or it can mint necessary tokens
manager_private_key: ManagerPrivateKeyArgs
Access to the private key, of which the wallet has MANAGER_ROLE
of network registry
If provided, this wallet will grant the created safe access to the network registry
Migrate
Migrate safe and module to a new network
Fields
network_provider: NetworkProviderArgs
Network name, contracts config file root, and customized provider, if available
local_identity: IdentityFileArgs
Arguments to locate identity file(s) of HOPR node(s)
allowance: Option<f64>
Allowance of the channel contract to manage HOPR tokens on behalf of deployed safe
private_key: PrivateKeyArgs
Access to the private key, of which the wallet either contains sufficient assets as the source of funds or it can mint necessary tokens
manager_private_key: ManagerPrivateKeyArgs
Access to the private key, of which the wallet has MANAGER_ROLE
of network registry
If provided, this wallet will grant the created safe access to the network registry
Move
Move nodes to one single safe and module pair
Fields
network_provider: NetworkProviderArgs
Network name, contracts config file root, and customized provider, if available
local_identity: IdentityFileArgs
Arguments to locate identity file(s) of HOPR node(s)
private_key: PrivateKeyArgs
Access to the private key, of which the wallet either contains sufficient assets as the source of funds or it can mint necessary tokens
manager_private_key: ManagerPrivateKeyArgs
Access to the private key, of which the wallet has MANAGER_ROLE
of network registry
If provided, this wallet will grant the created safe access to the network registry
Debug
Debug safe and module setup
Fields
network_provider: NetworkProviderArgs
Network name, contracts config file root, and customized provider, if available
local_identity: IdentityFileArgs
Arguments to locate identity file(s) of HOPR node(s)
Implementations§
Source§impl SafeModuleSubcommands
impl SafeModuleSubcommands
Sourcepub async fn execute_safe_module_creation(
network_provider: NetworkProviderArgs,
local_identity: IdentityFileArgs,
node_address: Option<String>,
admin_address: Option<String>,
threshold: u32,
allowance: Option<f64>,
hopr_amount: Option<f64>,
native_amount: Option<f64>,
private_key: PrivateKeyArgs,
manager_private_key: ManagerPrivateKeyArgs,
) -> Result<(), HelperErrors>
pub async fn execute_safe_module_creation( network_provider: NetworkProviderArgs, local_identity: IdentityFileArgs, node_address: Option<String>, admin_address: Option<String>, threshold: u32, allowance: Option<f64>, hopr_amount: Option<f64>, native_amount: Option<f64>, private_key: PrivateKeyArgs, manager_private_key: ManagerPrivateKeyArgs, ) -> Result<(), HelperErrors>
Execute the command, which quickly create necessary staking wallets and execute necessary on-chain transactions to setup a HOPR node.
- Create a safe instance and a node management module instance:
- Set default permissions for the module
- Include node as a member with restricted permission on sending assets
- transfer some HOPR token to the new safe (directly)
- transfer some native tokens to nodes
Sourcepub async fn execute_safe_module_moving(
network_provider: NetworkProviderArgs,
local_identity: IdentityFileArgs,
node_address: Option<String>,
old_module_address: String,
new_safe_address: String,
new_module_address: String,
private_key: PrivateKeyArgs,
manager_private_key: ManagerPrivateKeyArgs,
) -> Result<(), HelperErrors>
pub async fn execute_safe_module_moving( network_provider: NetworkProviderArgs, local_identity: IdentityFileArgs, node_address: Option<String>, old_module_address: String, new_safe_address: String, new_module_address: String, private_key: PrivateKeyArgs, manager_private_key: ManagerPrivateKeyArgs, ) -> Result<(), HelperErrors>
Execute the command, which moves nodes to a new managing safe and module pair Note that it does not register the node with the new safe on NodeSafeRegistry, because it is an action that nodes need to do on-start.
Sourcepub async fn execute_safe_module_migration(
network_provider: NetworkProviderArgs,
local_identity: IdentityFileArgs,
node_address: Option<String>,
safe_address: String,
module_address: String,
allowance: Option<f64>,
private_key: PrivateKeyArgs,
manager_private_key: ManagerPrivateKeyArgs,
) -> Result<(), HelperErrors>
pub async fn execute_safe_module_migration( network_provider: NetworkProviderArgs, local_identity: IdentityFileArgs, node_address: Option<String>, safe_address: String, module_address: String, allowance: Option<f64>, private_key: PrivateKeyArgs, manager_private_key: ManagerPrivateKeyArgs, ) -> Result<(), HelperErrors>
Execute the command, which migrates nodes to a new network Note that it does not register the node with the new safe on NodeSafeRegistry, because it is an action that nodes need to do on-start.
Sourcepub async fn execute_safe_module_debugging(
network_provider: NetworkProviderArgs,
local_identity: IdentityFileArgs,
node_address: Option<String>,
safe_address: String,
module_address: String,
) -> Result<(), HelperErrors>
pub async fn execute_safe_module_debugging( network_provider: NetworkProviderArgs, local_identity: IdentityFileArgs, node_address: Option<String>, safe_address: String, module_address: String, ) -> Result<(), HelperErrors>
Execute the command to debug the following:
- node xDAI balance
- If node has been included on Network Registry
- If node and safe are associated on Node Safe Registry
- If Safe is owned by the correct owner(s)
- Safe’s wxHOPR balance and allowance
- if node is included in the module
- If the channel contract is included as a target
- If the announce contract is included as a target
- If safe is the owner of the module
Trait Implementations§
Source§impl Clone for SafeModuleSubcommands
impl Clone for SafeModuleSubcommands
Source§fn clone(&self) -> SafeModuleSubcommands
fn clone(&self) -> SafeModuleSubcommands
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Cmd for SafeModuleSubcommands
impl Cmd for SafeModuleSubcommands
Source§impl CommandFactory for SafeModuleSubcommands
impl CommandFactory for SafeModuleSubcommands
Source§impl Debug for SafeModuleSubcommands
impl Debug for SafeModuleSubcommands
Source§impl FromArgMatches for SafeModuleSubcommands
impl FromArgMatches for SafeModuleSubcommands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§impl Parser for SafeModuleSubcommands
impl Parser for SafeModuleSubcommands
§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
Source§impl Subcommand for SafeModuleSubcommands
impl Subcommand for SafeModuleSubcommands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command
] so it can instantiate self
via
[FromArgMatches::update_from_arg_matches_mut
] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self
can parse a specific subcommandAuto Trait Implementations§
impl Freeze for SafeModuleSubcommands
impl RefUnwindSafe for SafeModuleSubcommands
impl Send for SafeModuleSubcommands
impl Sync for SafeModuleSubcommands
impl Unpin for SafeModuleSubcommands
impl UnwindSafe for SafeModuleSubcommands
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.