pub struct TokenNetworkRegistryProxy<T: Transport> { /* private fields */ }
Expand description
Token network registry proxy to interact with the on-chain contract.
Implementations§
source§impl<T> TokenNetworkRegistryProxy<T>
impl<T> TokenNetworkRegistryProxy<T>
sourcepub fn new(
web3: Web3<T>,
gas_metadata: Arc<GasMetadata>,
contract: Contract<T>
) -> Self
pub fn new( web3: Web3<T>, gas_metadata: Arc<GasMetadata>, contract: Contract<T> ) -> Self
Returns a new instance of TokenNetworkRegistryProxy
.
sourcepub async fn add_token(
&self,
account: Account<T>,
token_proxy: TokenProxy<T>,
token_address: TokenAddress,
block: BlockHash
) -> Result<(TransactionHash, TokenNetworkAddress), ProxyError>
pub async fn add_token( &self, account: Account<T>, token_proxy: TokenProxy<T>, token_address: TokenAddress, block: BlockHash ) -> Result<(TransactionHash, TokenNetworkAddress), ProxyError>
Register a new token network.
sourcepub async fn get_controller(
&self,
block: BlockHash
) -> Result<Address, ProxyError>
pub async fn get_controller( &self, block: BlockHash ) -> Result<Address, ProxyError>
Get the registry’s controller account.
sourcepub async fn get_token_network(
&self,
token_address: TokenAddress,
block: BlockHash
) -> Result<Address, ProxyError>
pub async fn get_token_network( &self, token_address: TokenAddress, block: BlockHash ) -> Result<Address, ProxyError>
Get address of a token network by token address.
sourcepub async fn settlement_timeout_min(
&self,
block: BlockHash
) -> Result<SettleTimeout, ProxyError>
pub async fn settlement_timeout_min( &self, block: BlockHash ) -> Result<SettleTimeout, ProxyError>
Get minimum settlement timeout.
sourcepub async fn settlement_timeout_max(
&self,
block: BlockHash
) -> Result<SettleTimeout, ProxyError>
pub async fn settlement_timeout_max( &self, block: BlockHash ) -> Result<SettleTimeout, ProxyError>
Get maximum settlement timeout.
sourcepub async fn get_secret_registry_address(
&self,
block: BlockHash
) -> Result<SecretRegistryAddress, ProxyError>
pub async fn get_secret_registry_address( &self, block: BlockHash ) -> Result<SecretRegistryAddress, ProxyError>
Returns address of secret registry
sourcepub async fn get_max_token_networks(
&self,
block: BlockHash
) -> Result<U256, ProxyError>
pub async fn get_max_token_networks( &self, block: BlockHash ) -> Result<U256, ProxyError>
Get the maximum number of allowed token networks.
sourcepub async fn get_token_networks_created(
&self,
block: BlockHash
) -> Result<U256, ProxyError>
pub async fn get_token_networks_created( &self, block: BlockHash ) -> Result<U256, ProxyError>
Get the current count of token networks.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for TokenNetworkRegistryProxy<T>where
T: Freeze,
impl<T> RefUnwindSafe for TokenNetworkRegistryProxy<T>where
T: RefUnwindSafe,
impl<T> Send for TokenNetworkRegistryProxy<T>where
T: Send,
impl<T> Sync for TokenNetworkRegistryProxy<T>where
T: Sync,
impl<T> Unpin for TokenNetworkRegistryProxy<T>where
T: Unpin,
impl<T> UnwindSafe for TokenNetworkRegistryProxy<T>where
T: 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
Mutably borrows from an owned value. Read more
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
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> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.