pub struct BankInstance<P, N = Ethereum> { /* private fields */ }Expand description
A Bank instance.
Contains type-safe methods for interacting with an on-chain instance of the
Bank 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> BankInstance<P, N>
Instantiation and getters/setters.
impl<P: Provider<N>, N: Network> BankInstance<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 Bank contract instance.
See the wrapper’s documentation for more details.
Sourcepub fn set_address(&mut self, address: Address)
pub fn set_address(&mut self, address: Address)
Sets the address.
Source§impl<P: Clone, N> BankInstance<&P, N>
impl<P: Clone, N> BankInstance<&P, N>
Sourcepub fn with_cloned_provider(self) -> BankInstance<P, N>
pub fn with_cloned_provider(self) -> BankInstance<P, N>
Clones the provider and returns a new instance with the cloned provider.
Source§impl<P: Provider<N>, N: Network> BankInstance<P, N>
Function calls.
impl<P: Provider<N>, N: Network> BankInstance<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 webTransferV2_0(
&self,
resource: <ResourceInfo as SolType>::RustType,
sender: <SenderInfo as SolType>::RustType,
revealedSubsection: Bytes,
notaryTlsProof: <NotaryTlsProof as SolType>::RustType,
backendSigData: <BackendSig as SolType>::RustType,
receiverHandle: String,
receiverUserId: String,
tokenName_: String,
amountStr: String,
amount: U256,
sourceUrl: String,
) -> SolCallBuilder<&P, webTransferV2_0Call, N>
pub fn webTransferV2_0( &self, resource: <ResourceInfo as SolType>::RustType, sender: <SenderInfo as SolType>::RustType, revealedSubsection: Bytes, notaryTlsProof: <NotaryTlsProof as SolType>::RustType, backendSigData: <BackendSig as SolType>::RustType, receiverHandle: String, receiverUserId: String, tokenName_: String, amountStr: String, amount: U256, sourceUrl: String, ) -> SolCallBuilder<&P, webTransferV2_0Call, N>
Creates a new call builder for the [webTransferV2_0] function.
Sourcepub fn webTransferV2_1(
&self,
resource: <ResourceInfo as SolType>::RustType,
sender: <SenderInfo as SolType>::RustType,
revealedSubsection: Bytes,
notaryTlsProof: <NotaryTlsProof as SolType>::RustType,
backendSigData: <BackendSig as SolType>::RustType,
receiverHandle: String,
receiverUserId: String,
token: Address,
amountStr: String,
amount: U256,
sourceUrl: String,
) -> SolCallBuilder<&P, webTransferV2_1Call, N>
pub fn webTransferV2_1( &self, resource: <ResourceInfo as SolType>::RustType, sender: <SenderInfo as SolType>::RustType, revealedSubsection: Bytes, notaryTlsProof: <NotaryTlsProof as SolType>::RustType, backendSigData: <BackendSig as SolType>::RustType, receiverHandle: String, receiverUserId: String, token: Address, amountStr: String, amount: U256, sourceUrl: String, ) -> SolCallBuilder<&P, webTransferV2_1Call, N>
Creates a new call builder for the [webTransferV2_1] function.
Sourcepub fn verifyProof(
&self,
resource: <ResourceInfo as SolType>::RustType,
sender: <SenderInfo as SolType>::RustType,
revealedSubsection: Bytes,
notaryTlsProof: <NotaryTlsProof as SolType>::RustType,
backendSigData: <BackendSig as SolType>::RustType,
receiverUserId: String,
) -> SolCallBuilder<&P, verifyProofCall, N>
pub fn verifyProof( &self, resource: <ResourceInfo as SolType>::RustType, sender: <SenderInfo as SolType>::RustType, revealedSubsection: Bytes, notaryTlsProof: <NotaryTlsProof as SolType>::RustType, backendSigData: <BackendSig as SolType>::RustType, receiverUserId: String, ) -> SolCallBuilder<&P, verifyProofCall, N>
Creates a new call builder for the [verifyProof] function.
Sourcepub fn transfer_within(
&self,
receiverPlatform: String,
receiverHandle: String,
receiverUserId: String,
token: Address,
amount: U256,
) -> SolCallBuilder<&P, transfer_withinCall, N>
pub fn transfer_within( &self, receiverPlatform: String, receiverHandle: String, receiverUserId: String, token: Address, amount: U256, ) -> SolCallBuilder<&P, transfer_withinCall, N>
Creates a new call builder for the [transfer_within] function.
Sourcepub fn deposit(
&self,
platform: String,
handle: String,
userId: String,
token: Address,
amount: U256,
) -> SolCallBuilder<&P, depositCall, N>
pub fn deposit( &self, platform: String, handle: String, userId: String, token: Address, amount: U256, ) -> SolCallBuilder<&P, depositCall, N>
Creates a new call builder for the [deposit] function.
Sourcepub fn withdraw(
&self,
recipient: Address,
token: Address,
amount: U256,
) -> SolCallBuilder<&P, withdrawCall, N>
pub fn withdraw( &self, recipient: Address, token: Address, amount: U256, ) -> SolCallBuilder<&P, withdrawCall, N>
Creates a new call builder for the [withdraw] function.
Sourcepub fn balanceOf_0(
&self,
wallet: Address,
token: Address,
) -> SolCallBuilder<&P, balanceOf_0Call, N>
pub fn balanceOf_0( &self, wallet: Address, token: Address, ) -> SolCallBuilder<&P, balanceOf_0Call, N>
Creates a new call builder for the [balanceOf_0] function.
Sourcepub fn balanceOf_1(
&self,
platform: String,
handle: String,
userId: String,
token: Address,
) -> SolCallBuilder<&P, balanceOf_1Call, N>
pub fn balanceOf_1( &self, platform: String, handle: String, userId: String, token: Address, ) -> SolCallBuilder<&P, balanceOf_1Call, N>
Creates a new call builder for the [balanceOf_1] function.
Sourcepub fn balanceOfTotal_0(
&self,
wallet: Address,
token: Address,
) -> SolCallBuilder<&P, balanceOfTotal_0Call, N>
pub fn balanceOfTotal_0( &self, wallet: Address, token: Address, ) -> SolCallBuilder<&P, balanceOfTotal_0Call, N>
Creates a new call builder for the [balanceOfTotal_0] function.
Sourcepub fn balanceOfTotal_1(
&self,
platform: String,
handle: String,
userId: String,
token: Address,
) -> SolCallBuilder<&P, balanceOfTotal_1Call, N>
pub fn balanceOfTotal_1( &self, platform: String, handle: String, userId: String, token: Address, ) -> SolCallBuilder<&P, balanceOfTotal_1Call, N>
Creates a new call builder for the [balanceOfTotal_1] function.
Sourcepub fn registeredBalances(
&self,
wallet: Address,
token: Address,
) -> SolCallBuilder<&P, registeredBalancesCall, N>
pub fn registeredBalances( &self, wallet: Address, token: Address, ) -> SolCallBuilder<&P, registeredBalancesCall, N>
Creates a new call builder for the [registeredBalances] function.
Sourcepub fn unregisteredBalances(
&self,
key: FixedBytes<32>,
token: Address,
) -> SolCallBuilder<&P, unregisteredBalancesCall, N>
pub fn unregisteredBalances( &self, key: FixedBytes<32>, token: Address, ) -> SolCallBuilder<&P, unregisteredBalancesCall, N>
Creates a new call builder for the [unregisteredBalances] function.
Sourcepub fn identityHash(
&self,
domain: String,
username: String,
) -> SolCallBuilder<&P, identityHashCall, N>
pub fn identityHash( &self, domain: String, username: String, ) -> SolCallBuilder<&P, identityHashCall, N>
Creates a new call builder for the [identityHash] function.
Sourcepub fn pause(&self) -> SolCallBuilder<&P, pauseCall, N>
pub fn pause(&self) -> SolCallBuilder<&P, pauseCall, N>
Creates a new call builder for the [pause] function.
Sourcepub fn unpause(&self) -> SolCallBuilder<&P, unpauseCall, N>
pub fn unpause(&self) -> SolCallBuilder<&P, unpauseCall, N>
Creates a new call builder for the [unpause] function.
Sourcepub fn setRegistry(
&self,
_registry: Address,
) -> SolCallBuilder<&P, setRegistryCall, N>
pub fn setRegistry( &self, _registry: Address, ) -> SolCallBuilder<&P, setRegistryCall, N>
Creates a new call builder for the [setRegistry] function.
Sourcepub fn registerToken(
&self,
name: String,
token: Address,
) -> SolCallBuilder<&P, registerTokenCall, N>
pub fn registerToken( &self, name: String, token: Address, ) -> SolCallBuilder<&P, registerTokenCall, N>
Creates a new call builder for the [registerToken] function.
Sourcepub fn unregisterToken(
&self,
name: String,
) -> SolCallBuilder<&P, unregisterTokenCall, N>
pub fn unregisterToken( &self, name: String, ) -> SolCallBuilder<&P, unregisterTokenCall, N>
Creates a new call builder for the [unregisterToken] function.
Sourcepub fn resolveToken(
&self,
name: String,
) -> SolCallBuilder<&P, resolveTokenCall, N>
pub fn resolveToken( &self, name: String, ) -> SolCallBuilder<&P, resolveTokenCall, N>
Creates a new call builder for the [resolveToken] function.
Sourcepub fn getRegisteredTokens(
&self,
) -> SolCallBuilder<&P, getRegisteredTokensCall, N>
pub fn getRegisteredTokens( &self, ) -> SolCallBuilder<&P, getRegisteredTokensCall, N>
Creates a new call builder for the [getRegisteredTokens] function.
Sourcepub fn tokenName(&self, token: Address) -> SolCallBuilder<&P, tokenNameCall, N>
pub fn tokenName(&self, token: Address) -> SolCallBuilder<&P, tokenNameCall, N>
Creates a new call builder for the [tokenName] function.
Sourcepub fn setPlatformTemplate(
&self,
platform: String,
newTemplate: String,
) -> SolCallBuilder<&P, setPlatformTemplateCall, N>
pub fn setPlatformTemplate( &self, platform: String, newTemplate: String, ) -> SolCallBuilder<&P, setPlatformTemplateCall, N>
Creates a new call builder for the [setPlatformTemplate] function.
Sourcepub fn clearPlatformTemplates(
&self,
platform: String,
) -> SolCallBuilder<&P, clearPlatformTemplatesCall, N>
pub fn clearPlatformTemplates( &self, platform: String, ) -> SolCallBuilder<&P, clearPlatformTemplatesCall, N>
Creates a new call builder for the [clearPlatformTemplates] function.
Sourcepub fn platformTemplateCount(
&self,
platform: String,
) -> SolCallBuilder<&P, platformTemplateCountCall, N>
pub fn platformTemplateCount( &self, platform: String, ) -> SolCallBuilder<&P, platformTemplateCountCall, N>
Creates a new call builder for the [platformTemplateCount] function.
Sourcepub fn getPlatformTemplate(
&self,
platform: String,
index: U256,
) -> SolCallBuilder<&P, getPlatformTemplateCall, N>
pub fn getPlatformTemplate( &self, platform: String, index: U256, ) -> SolCallBuilder<&P, getPlatformTemplateCall, N>
Creates a new call builder for the [getPlatformTemplate] function.
Sourcepub fn setResourceTypePrefix(
&self,
resourceType: String,
prefix: String,
) -> SolCallBuilder<&P, setResourceTypePrefixCall, N>
pub fn setResourceTypePrefix( &self, resourceType: String, prefix: String, ) -> SolCallBuilder<&P, setResourceTypePrefixCall, N>
Creates a new call builder for the [setResourceTypePrefix] function.
Sourcepub fn setPlatformWebPrefix(
&self,
platform: String,
prefix: String,
) -> SolCallBuilder<&P, setPlatformWebPrefixCall, N>
pub fn setPlatformWebPrefix( &self, platform: String, prefix: String, ) -> SolCallBuilder<&P, setPlatformWebPrefixCall, N>
Creates a new call builder for the [setPlatformWebPrefix] function.
Sourcepub fn getPlatformWebPrefix(
&self,
platform: String,
) -> SolCallBuilder<&P, getPlatformWebPrefixCall, N>
pub fn getPlatformWebPrefix( &self, platform: String, ) -> SolCallBuilder<&P, getPlatformWebPrefixCall, N>
Creates a new call builder for the [getPlatformWebPrefix] function.
Sourcepub fn registry(&self) -> SolCallBuilder<&P, registryCall, N>
pub fn registry(&self) -> SolCallBuilder<&P, registryCall, N>
Creates a new call builder for the [registry] function.
Sourcepub fn paused(&self) -> SolCallBuilder<&P, pausedCall, N>
pub fn paused(&self) -> SolCallBuilder<&P, pausedCall, N>
Creates a new call builder for the [paused] function.
Source§impl<P: Provider<N>, N: Network> BankInstance<P, N>
Event filters.
impl<P: Provider<N>, N: Network> BankInstance<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 Deposited_filter(&self) -> Event<&P, Deposited, N>
pub fn Deposited_filter(&self) -> Event<&P, Deposited, N>
Creates a new event filter for the Deposited event.
Sourcepub fn Withdrawn_filter(&self) -> Event<&P, Withdrawn, N>
pub fn Withdrawn_filter(&self) -> Event<&P, Withdrawn, N>
Creates a new event filter for the Withdrawn event.
Sourcepub fn TransferWithin_filter(&self) -> Event<&P, TransferWithin, N>
pub fn TransferWithin_filter(&self) -> Event<&P, TransferWithin, N>
Creates a new event filter for the TransferWithin event.
Sourcepub fn WebTransferV3_filter(&self) -> Event<&P, WebTransferV3, N>
pub fn WebTransferV3_filter(&self) -> Event<&P, WebTransferV3, N>
Creates a new event filter for the WebTransferV3 event.
Sourcepub fn Paused_filter(&self) -> Event<&P, Paused, N>
pub fn Paused_filter(&self) -> Event<&P, Paused, N>
Creates a new event filter for the Paused event.
Sourcepub fn Unpaused_filter(&self) -> Event<&P, Unpaused, N>
pub fn Unpaused_filter(&self) -> Event<&P, Unpaused, N>
Creates a new event filter for the Unpaused event.
Sourcepub fn RegistrySet_filter(&self) -> Event<&P, RegistrySet, N>
pub fn RegistrySet_filter(&self) -> Event<&P, RegistrySet, N>
Creates a new event filter for the RegistrySet event.
Sourcepub fn TokenRegistered_filter(&self) -> Event<&P, TokenRegistered, N>
pub fn TokenRegistered_filter(&self) -> Event<&P, TokenRegistered, N>
Creates a new event filter for the TokenRegistered event.
Sourcepub fn TokenUnregistered_filter(&self) -> Event<&P, TokenUnregistered, N>
pub fn TokenUnregistered_filter(&self) -> Event<&P, TokenUnregistered, N>
Creates a new event filter for the TokenUnregistered event.
Trait Implementations§
Auto Trait Implementations§
impl<P, N> Freeze for BankInstance<P, N>where
P: Freeze,
impl<P, N> RefUnwindSafe for BankInstance<P, N>where
P: RefUnwindSafe,
N: RefUnwindSafe,
impl<P, N> Send for BankInstance<P, N>
impl<P, N> Sync for BankInstance<P, N>
impl<P, N> Unpin for BankInstance<P, N>
impl<P, N> UnsafeUnpin for BankInstance<P, N>where
P: UnsafeUnpin,
impl<P, N> UnwindSafe for BankInstance<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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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