pub struct HoprNodeManagementModuleInstance<P, N = Ethereum> { /* private fields */ }Expand description
A HoprNodeManagementModule instance.
Contains type-safe methods for interacting with an on-chain instance of the
HoprNodeManagementModule contract located at a given address, using a given
provider P.
If the contract bytecode is available (see the sol!
documentation on how to provide it), the deploy and deploy_builder methods can
be used to deploy a new instance of the contract.
See the module-level documentation for all the available methods.
Implementations§
Source§impl<P: Provider<N>, N: Network> HoprNodeManagementModuleInstance<P, N>
Instantiation and getters/setters.
impl<P: Provider<N>, N: Network> HoprNodeManagementModuleInstance<P, N>
Instantiation and getters/setters.
Sourcepub const fn new(address: Address, provider: P) -> Self
pub const fn new(address: Address, provider: P) -> Self
Creates a new wrapper around an on-chain HoprNodeManagementModule contract instance.
See the wrapper’s documentation for more details.
Sourcepub async fn deploy(
provider: P,
) -> Result<HoprNodeManagementModuleInstance<P, N>>
pub async fn deploy( provider: P, ) -> Result<HoprNodeManagementModuleInstance<P, N>>
Deploys this contract using the given provider and constructor arguments, if any.
Returns a new instance of the contract, if the deployment was successful.
For more fine-grained control over the deployment process, use deploy_builder instead.
Sourcepub fn deploy_builder(provider: P) -> RawCallBuilder<P, N>
pub fn deploy_builder(provider: P) -> RawCallBuilder<P, N>
Creates a RawCallBuilder for deploying this contract using the given provider
and constructor arguments, if any.
This is a simple wrapper around creating a RawCallBuilder with the data set to
the bytecode concatenated with the constructor’s ABI-encoded arguments.
Sourcepub fn set_address(&mut self, address: Address)
pub fn set_address(&mut self, address: Address)
Sets the address.
Source§impl<P: Clone, N> HoprNodeManagementModuleInstance<&P, N>
impl<P: Clone, N> HoprNodeManagementModuleInstance<&P, N>
Sourcepub fn with_cloned_provider(self) -> HoprNodeManagementModuleInstance<P, N>
pub fn with_cloned_provider(self) -> HoprNodeManagementModuleInstance<P, N>
Clones the provider and returns a new instance with the cloned provider.
Source§impl<P: Provider<N>, N: Network> HoprNodeManagementModuleInstance<P, N>
Function calls.
impl<P: Provider<N>, N: Network> HoprNodeManagementModuleInstance<P, N>
Function calls.
Sourcepub fn call_builder<C: SolCall>(&self, call: &C) -> SolCallBuilder<&P, C, N>
pub fn call_builder<C: SolCall>(&self, call: &C) -> SolCallBuilder<&P, C, N>
Creates a new call builder using this contract instance’s provider and address.
Note that the call can be any function call, not just those defined in this contract. Prefer using the other methods for building type-safe contract calls.
Sourcepub fn addChannelsAndTokenTarget(
&self,
defaultTarget: <Target as SolType>::RustType,
) -> SolCallBuilder<&P, addChannelsAndTokenTargetCall, N>
pub fn addChannelsAndTokenTarget( &self, defaultTarget: <Target as SolType>::RustType, ) -> SolCallBuilder<&P, addChannelsAndTokenTargetCall, N>
Creates a new call builder for the [addChannelsAndTokenTarget] function.
Sourcepub fn addNode(
&self,
nodeAddress: Address,
) -> SolCallBuilder<&P, addNodeCall, N>
pub fn addNode( &self, nodeAddress: Address, ) -> SolCallBuilder<&P, addNodeCall, N>
Creates a new call builder for the [addNode] function.
Sourcepub fn decodeFunctionSigsAndPermissions(
&self,
encoded: FixedBytes<32>,
length: U256,
) -> SolCallBuilder<&P, decodeFunctionSigsAndPermissionsCall, N>
pub fn decodeFunctionSigsAndPermissions( &self, encoded: FixedBytes<32>, length: U256, ) -> SolCallBuilder<&P, decodeFunctionSigsAndPermissionsCall, N>
Creates a new call builder for the [decodeFunctionSigsAndPermissions] function.
Sourcepub fn encodeFunctionSigsAndPermissions(
&self,
functionSigs: Vec<FixedBytes<4>>,
permissions: Vec<<GranularPermission as SolType>::RustType>,
) -> SolCallBuilder<&P, encodeFunctionSigsAndPermissionsCall, N>
pub fn encodeFunctionSigsAndPermissions( &self, functionSigs: Vec<FixedBytes<4>>, permissions: Vec<<GranularPermission as SolType>::RustType>, ) -> SolCallBuilder<&P, encodeFunctionSigsAndPermissionsCall, N>
Creates a new call builder for the [encodeFunctionSigsAndPermissions] function.
Sourcepub fn execTransactionFromModule(
&self,
to: Address,
value: U256,
data: Bytes,
operation: <Operation as SolType>::RustType,
) -> SolCallBuilder<&P, execTransactionFromModuleCall, N>
pub fn execTransactionFromModule( &self, to: Address, value: U256, data: Bytes, operation: <Operation as SolType>::RustType, ) -> SolCallBuilder<&P, execTransactionFromModuleCall, N>
Creates a new call builder for the [execTransactionFromModule] function.
Sourcepub fn execTransactionFromModuleReturnData(
&self,
to: Address,
value: U256,
data: Bytes,
operation: <Operation as SolType>::RustType,
) -> SolCallBuilder<&P, execTransactionFromModuleReturnDataCall, N>
pub fn execTransactionFromModuleReturnData( &self, to: Address, value: U256, data: Bytes, operation: <Operation as SolType>::RustType, ) -> SolCallBuilder<&P, execTransactionFromModuleReturnDataCall, N>
Creates a new call builder for the [execTransactionFromModuleReturnData] function.
Sourcepub fn getGranularPermissions(
&self,
capabilityKey: FixedBytes<32>,
pairId: FixedBytes<32>,
) -> SolCallBuilder<&P, getGranularPermissionsCall, N>
pub fn getGranularPermissions( &self, capabilityKey: FixedBytes<32>, pairId: FixedBytes<32>, ) -> SolCallBuilder<&P, getGranularPermissionsCall, N>
Creates a new call builder for the [getGranularPermissions] function.
Sourcepub fn getTargets(&self) -> SolCallBuilder<&P, getTargetsCall, N>
pub fn getTargets(&self) -> SolCallBuilder<&P, getTargetsCall, N>
Creates a new call builder for the [getTargets] function.
Sourcepub fn includeNode(
&self,
nodeDefaultTarget: <Target as SolType>::RustType,
) -> SolCallBuilder<&P, includeNodeCall, N>
pub fn includeNode( &self, nodeDefaultTarget: <Target as SolType>::RustType, ) -> SolCallBuilder<&P, includeNodeCall, N>
Creates a new call builder for the [includeNode] function.
Sourcepub fn initialize(
&self,
initParams: Bytes,
) -> SolCallBuilder<&P, initializeCall, N>
pub fn initialize( &self, initParams: Bytes, ) -> SolCallBuilder<&P, initializeCall, N>
Creates a new call builder for the [initialize] function.
Sourcepub fn isHoprNodeManagementModule(
&self,
) -> SolCallBuilder<&P, isHoprNodeManagementModuleCall, N>
pub fn isHoprNodeManagementModule( &self, ) -> SolCallBuilder<&P, isHoprNodeManagementModuleCall, N>
Creates a new call builder for the [isHoprNodeManagementModule] function.
Sourcepub fn isNode(&self, nodeAddress: Address) -> SolCallBuilder<&P, isNodeCall, N>
pub fn isNode(&self, nodeAddress: Address) -> SolCallBuilder<&P, isNodeCall, N>
Creates a new call builder for the [isNode] function.
Sourcepub fn multisend(&self) -> SolCallBuilder<&P, multisendCall, N>
pub fn multisend(&self) -> SolCallBuilder<&P, multisendCall, N>
Creates a new call builder for the [multisend] function.
Sourcepub fn owner(&self) -> SolCallBuilder<&P, ownerCall, N>
pub fn owner(&self) -> SolCallBuilder<&P, ownerCall, N>
Creates a new call builder for the [owner] function.
Sourcepub fn proxiableUUID(&self) -> SolCallBuilder<&P, proxiableUUIDCall, N>
pub fn proxiableUUID(&self) -> SolCallBuilder<&P, proxiableUUIDCall, N>
Creates a new call builder for the [proxiableUUID] function.
Sourcepub fn removeNode(
&self,
nodeAddress: Address,
) -> SolCallBuilder<&P, removeNodeCall, N>
pub fn removeNode( &self, nodeAddress: Address, ) -> SolCallBuilder<&P, removeNodeCall, N>
Creates a new call builder for the [removeNode] function.
Sourcepub fn renounceOwnership(&self) -> SolCallBuilder<&P, renounceOwnershipCall, N>
pub fn renounceOwnership(&self) -> SolCallBuilder<&P, renounceOwnershipCall, N>
Creates a new call builder for the [renounceOwnership] function.
Sourcepub fn revokeTarget(
&self,
targetAddress: Address,
) -> SolCallBuilder<&P, revokeTargetCall, N>
pub fn revokeTarget( &self, targetAddress: Address, ) -> SolCallBuilder<&P, revokeTargetCall, N>
Creates a new call builder for the [revokeTarget] function.
Sourcepub fn scopeChannelsCapabilities(
&self,
targetAddress: Address,
channelId: FixedBytes<32>,
encodedSigsPermissions: FixedBytes<32>,
) -> SolCallBuilder<&P, scopeChannelsCapabilitiesCall, N>
pub fn scopeChannelsCapabilities( &self, targetAddress: Address, channelId: FixedBytes<32>, encodedSigsPermissions: FixedBytes<32>, ) -> SolCallBuilder<&P, scopeChannelsCapabilitiesCall, N>
Creates a new call builder for the [scopeChannelsCapabilities] function.
Sourcepub fn scopeSendCapability(
&self,
nodeAddress: Address,
beneficiary: Address,
permission: <GranularPermission as SolType>::RustType,
) -> SolCallBuilder<&P, scopeSendCapabilityCall, N>
pub fn scopeSendCapability( &self, nodeAddress: Address, beneficiary: Address, permission: <GranularPermission as SolType>::RustType, ) -> SolCallBuilder<&P, scopeSendCapabilityCall, N>
Creates a new call builder for the [scopeSendCapability] function.
Sourcepub fn scopeTargetChannels(
&self,
defaultTarget: <Target as SolType>::RustType,
) -> SolCallBuilder<&P, scopeTargetChannelsCall, N>
pub fn scopeTargetChannels( &self, defaultTarget: <Target as SolType>::RustType, ) -> SolCallBuilder<&P, scopeTargetChannelsCall, N>
Creates a new call builder for the [scopeTargetChannels] function.
Sourcepub fn scopeTargetSend(
&self,
defaultTarget: <Target as SolType>::RustType,
) -> SolCallBuilder<&P, scopeTargetSendCall, N>
pub fn scopeTargetSend( &self, defaultTarget: <Target as SolType>::RustType, ) -> SolCallBuilder<&P, scopeTargetSendCall, N>
Creates a new call builder for the [scopeTargetSend] function.
Sourcepub fn scopeTargetToken(
&self,
defaultTarget: <Target as SolType>::RustType,
) -> SolCallBuilder<&P, scopeTargetTokenCall, N>
pub fn scopeTargetToken( &self, defaultTarget: <Target as SolType>::RustType, ) -> SolCallBuilder<&P, scopeTargetTokenCall, N>
Creates a new call builder for the [scopeTargetToken] function.
Sourcepub fn scopeTokenCapabilities(
&self,
nodeAddress: Address,
targetAddress: Address,
beneficiary: Address,
encodedSigsPermissions: FixedBytes<32>,
) -> SolCallBuilder<&P, scopeTokenCapabilitiesCall, N>
pub fn scopeTokenCapabilities( &self, nodeAddress: Address, targetAddress: Address, beneficiary: Address, encodedSigsPermissions: FixedBytes<32>, ) -> SolCallBuilder<&P, scopeTokenCapabilitiesCall, N>
Creates a new call builder for the [scopeTokenCapabilities] function.
Sourcepub fn setMultisend(
&self,
_multisend: Address,
) -> SolCallBuilder<&P, setMultisendCall, N>
pub fn setMultisend( &self, _multisend: Address, ) -> SolCallBuilder<&P, setMultisendCall, N>
Creates a new call builder for the [setMultisend] function.
Sourcepub fn transferOwnership(
&self,
newOwner: Address,
) -> SolCallBuilder<&P, transferOwnershipCall, N>
pub fn transferOwnership( &self, newOwner: Address, ) -> SolCallBuilder<&P, transferOwnershipCall, N>
Creates a new call builder for the [transferOwnership] function.
Sourcepub fn tryGetTarget(
&self,
targetAddress: Address,
) -> SolCallBuilder<&P, tryGetTargetCall, N>
pub fn tryGetTarget( &self, targetAddress: Address, ) -> SolCallBuilder<&P, tryGetTargetCall, N>
Creates a new call builder for the [tryGetTarget] function.
Sourcepub fn upgradeTo(
&self,
newImplementation: Address,
) -> SolCallBuilder<&P, upgradeToCall, N>
pub fn upgradeTo( &self, newImplementation: Address, ) -> SolCallBuilder<&P, upgradeToCall, N>
Creates a new call builder for the [upgradeTo] function.
Sourcepub fn upgradeToAndCall(
&self,
newImplementation: Address,
data: Bytes,
) -> SolCallBuilder<&P, upgradeToAndCallCall, N>
pub fn upgradeToAndCall( &self, newImplementation: Address, data: Bytes, ) -> SolCallBuilder<&P, upgradeToAndCallCall, N>
Creates a new call builder for the [upgradeToAndCall] function.
Source§impl<P: Provider<N>, N: Network> HoprNodeManagementModuleInstance<P, N>
Event filters.
impl<P: Provider<N>, N: Network> HoprNodeManagementModuleInstance<P, N>
Event filters.
Sourcepub fn event_filter<E: SolEvent>(&self) -> Event<&P, E, N>
pub fn event_filter<E: SolEvent>(&self) -> Event<&P, E, N>
Creates a new event filter using this contract instance’s provider and address.
Note that the type can be any event, not just those defined in this contract. Prefer using the other methods for building type-safe event filters.
Sourcepub fn AdminChanged_filter(&self) -> Event<&P, AdminChanged, N>
pub fn AdminChanged_filter(&self) -> Event<&P, AdminChanged, N>
Creates a new event filter for the AdminChanged event.
Sourcepub fn BeaconUpgraded_filter(&self) -> Event<&P, BeaconUpgraded, N>
pub fn BeaconUpgraded_filter(&self) -> Event<&P, BeaconUpgraded, N>
Creates a new event filter for the BeaconUpgraded event.
Sourcepub fn ExecutionFailure_filter(&self) -> Event<&P, ExecutionFailure, N>
pub fn ExecutionFailure_filter(&self) -> Event<&P, ExecutionFailure, N>
Creates a new event filter for the ExecutionFailure event.
Sourcepub fn ExecutionSuccess_filter(&self) -> Event<&P, ExecutionSuccess, N>
pub fn ExecutionSuccess_filter(&self) -> Event<&P, ExecutionSuccess, N>
Creates a new event filter for the ExecutionSuccess event.
Sourcepub fn Initialized_filter(&self) -> Event<&P, Initialized, N>
pub fn Initialized_filter(&self) -> Event<&P, Initialized, N>
Creates a new event filter for the Initialized event.
Sourcepub fn NodeAdded_filter(&self) -> Event<&P, NodeAdded, N>
pub fn NodeAdded_filter(&self) -> Event<&P, NodeAdded, N>
Creates a new event filter for the NodeAdded event.
Sourcepub fn NodeRemoved_filter(&self) -> Event<&P, NodeRemoved, N>
pub fn NodeRemoved_filter(&self) -> Event<&P, NodeRemoved, N>
Creates a new event filter for the NodeRemoved event.
Sourcepub fn OwnershipTransferred_filter(&self) -> Event<&P, OwnershipTransferred, N>
pub fn OwnershipTransferred_filter(&self) -> Event<&P, OwnershipTransferred, N>
Creates a new event filter for the OwnershipTransferred event.
Sourcepub fn SetMultisendAddress_filter(&self) -> Event<&P, SetMultisendAddress, N>
pub fn SetMultisendAddress_filter(&self) -> Event<&P, SetMultisendAddress, N>
Creates a new event filter for the SetMultisendAddress event.
Sourcepub fn Upgraded_filter(&self) -> Event<&P, Upgraded, N>
pub fn Upgraded_filter(&self) -> Event<&P, Upgraded, N>
Creates a new event filter for the Upgraded event.
Trait Implementations§
Source§impl<P: Clone, N: Clone> Clone for HoprNodeManagementModuleInstance<P, N>
impl<P: Clone, N: Clone> Clone for HoprNodeManagementModuleInstance<P, N>
Source§fn clone(&self) -> HoprNodeManagementModuleInstance<P, N>
fn clone(&self) -> HoprNodeManagementModuleInstance<P, N>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<P, N> Freeze for HoprNodeManagementModuleInstance<P, N>where
P: Freeze,
impl<P, N> RefUnwindSafe for HoprNodeManagementModuleInstance<P, N>where
P: RefUnwindSafe,
N: RefUnwindSafe,
impl<P, N> Send for HoprNodeManagementModuleInstance<P, N>
impl<P, N> Sync for HoprNodeManagementModuleInstance<P, N>
impl<P, N> Unpin for HoprNodeManagementModuleInstance<P, N>
impl<P, N> UnwindSafe for HoprNodeManagementModuleInstance<P, N>where
P: UnwindSafe,
N: UnwindSafe,
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> 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> 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