pub struct TransactionApi;Implementations§
Source§impl TransactionApi
impl TransactionApi
Sourcepub fn proxy(
&self,
real: Real,
force_proxy_type: ForceProxyType,
call: Call,
) -> StaticPayload<Proxy>
pub fn proxy( &self, real: Real, force_proxy_type: ForceProxyType, call: Call, ) -> StaticPayload<Proxy>
Dispatch the given call from an account that the sender is authorised for through
add_proxy.
The dispatch origin for this call must be Signed.
Parameters:
real: The account that the proxy will make a call on behalf of.force_proxy_type: Specify the exact proxy type to be used and checked for this call.call: The call to be made by therealaccount.
Sourcepub fn add_proxy(
&self,
delegate: Delegate,
proxy_type: ProxyType,
delay: Delay,
) -> StaticPayload<AddProxy>
pub fn add_proxy( &self, delegate: Delegate, proxy_type: ProxyType, delay: Delay, ) -> StaticPayload<AddProxy>
Register a proxy account for the sender that is able to make calls on its behalf.
The dispatch origin for this call must be Signed.
Parameters:
proxy: The account that thecallerwould like to make a proxy.proxy_type: The permissions allowed for this proxy account.delay: The announcement period required of the initial proxy. Will generally be zero.
Sourcepub fn remove_proxy(
&self,
delegate: Delegate,
proxy_type: ProxyType,
delay: Delay,
) -> StaticPayload<RemoveProxy>
pub fn remove_proxy( &self, delegate: Delegate, proxy_type: ProxyType, delay: Delay, ) -> StaticPayload<RemoveProxy>
Unregister a proxy account for the sender.
The dispatch origin for this call must be Signed.
Parameters:
proxy: The account that thecallerwould like to remove as a proxy.proxy_type: The permissions currently enabled for the removed proxy account.
Sourcepub fn remove_proxies(&self) -> StaticPayload<RemoveProxies>
pub fn remove_proxies(&self) -> StaticPayload<RemoveProxies>
Unregister all proxy accounts for the sender.
The dispatch origin for this call must be Signed.
WARNING: This may be called on accounts created by pure, however if done, then
the unreserved fees will be inaccessible. All access to this account will be lost.
Sourcepub fn create_pure(
&self,
proxy_type: ProxyType,
delay: Delay,
index: Index,
) -> StaticPayload<CreatePure>
pub fn create_pure( &self, proxy_type: ProxyType, delay: Delay, index: Index, ) -> StaticPayload<CreatePure>
Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and
initialize it with a proxy of proxy_type for origin sender.
Requires a Signed origin.
proxy_type: The type of the proxy that the sender will be registered as over the new account. This will almost always be the most permissiveProxyTypepossible to allow for maximum flexibility.index: A disambiguation index, in case this is called multiple times in the same transaction (e.g. withutility::batch). Unless you’re usingbatchyou probably just want to use0.delay: The announcement period required of the initial proxy. Will generally be zero.
Fails with Duplicate if this has already been called in this transaction, from the
same sender, with the same parameters.
Fails if there are insufficient funds to pay for deposit.
Sourcepub fn kill_pure(
&self,
spawner: Spawner,
proxy_type: ProxyType,
index: Index,
height: Height,
ext_index: ExtIndex,
) -> StaticPayload<KillPure>
pub fn kill_pure( &self, spawner: Spawner, proxy_type: ProxyType, index: Index, height: Height, ext_index: ExtIndex, ) -> StaticPayload<KillPure>
Removes a previously spawned pure proxy.
WARNING: All access to this account will be lost. Any funds held in it will be inaccessible.
Requires a Signed origin, and the sender account must have been created by a call to
pure with corresponding parameters.
spawner: The account that originally calledpureto create this account.index: The disambiguation index originally passed topure. Probably0.proxy_type: The proxy type originally passed topure.height: The height of the chain when the call topurewas processed.ext_index: The extrinsic index in which the call topurewas processed.
Fails with NoPermission in case the caller is not a previously created pure
account whose pure call has corresponding parameters.
Sourcepub fn announce(
&self,
real: Real,
call_hash: CallHash,
) -> StaticPayload<Announce>
pub fn announce( &self, real: Real, call_hash: CallHash, ) -> StaticPayload<Announce>
Publish the hash of a proxy-call that will be made in the future.
This must be called some number of blocks before the corresponding proxy is attempted
if the delay associated with the proxy relationship is greater than zero.
No more than MaxPending announcements may be made at any one time.
This will take a deposit of AnnouncementDepositFactor as well as
AnnouncementDepositBase if there are no other pending announcements.
The dispatch origin for this call must be Signed and a proxy of real.
Parameters:
real: The account that the proxy will make a call on behalf of.call_hash: The hash of the call to be made by therealaccount.
Sourcepub fn remove_announcement(
&self,
real: Real,
call_hash: CallHash,
) -> StaticPayload<RemoveAnnouncement>
pub fn remove_announcement( &self, real: Real, call_hash: CallHash, ) -> StaticPayload<RemoveAnnouncement>
Remove a given announcement.
May be called by a proxy account to remove a call they previously announced and return the deposit.
The dispatch origin for this call must be Signed.
Parameters:
real: The account that the proxy will make a call on behalf of.call_hash: The hash of the call to be made by therealaccount.
Sourcepub fn reject_announcement(
&self,
delegate: Delegate,
call_hash: CallHash,
) -> StaticPayload<RejectAnnouncement>
pub fn reject_announcement( &self, delegate: Delegate, call_hash: CallHash, ) -> StaticPayload<RejectAnnouncement>
Remove the given announcement of a delegate.
May be called by a target (proxied) account to remove a call that one of their delegates
(delegate) has announced they want to execute. The deposit is returned.
The dispatch origin for this call must be Signed.
Parameters:
delegate: The account that previously announced the call.call_hash: The hash of the call to be made.
Sourcepub fn proxy_announced(
&self,
delegate: Delegate,
real: Real,
force_proxy_type: ForceProxyType,
call: Call,
) -> StaticPayload<ProxyAnnounced>
pub fn proxy_announced( &self, delegate: Delegate, real: Real, force_proxy_type: ForceProxyType, call: Call, ) -> StaticPayload<ProxyAnnounced>
Dispatch the given call from an account that the sender is authorized for through
add_proxy.
Removes any corresponding announcement(s).
The dispatch origin for this call must be Signed.
Parameters:
real: The account that the proxy will make a call on behalf of.force_proxy_type: Specify the exact proxy type to be used and checked for this call.call: The call to be made by therealaccount.
Auto Trait Implementations§
impl Freeze for TransactionApi
impl RefUnwindSafe for TransactionApi
impl Send for TransactionApi
impl Sync for TransactionApi
impl Unpin for TransactionApi
impl UnwindSafe for TransactionApi
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> FmtForward for T
impl<T> FmtForward for T
Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§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 moreSource§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 moreSource§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
Source§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
Source§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.Source§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.Source§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.Source§impl<T> Tap for T
impl<T> Tap for T
Source§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 moreSource§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 moreSource§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 moreSource§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 moreSource§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 moreSource§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 moreSource§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.