pub enum TransactionEntryPoint {
Show 13 variants
Call,
Custom(String),
Transfer,
Burn,
AddBid,
WithdrawBid,
Delegate,
Undelegate,
Redelegate,
ActivateBid,
ChangeBidPublicKey,
AddReservations,
CancelReservations,
}
Expand description
The entry point of a crate::Transaction
.
Variants§
Call
The default entry point name.
Custom(String)
A non-native, arbitrary entry point.
Transfer
The transfer
native entry point, used to transfer Motes
from a source purse to a target
purse.
Requires the following runtime args:
- “source”:
URef
- “target”:
URef
- “amount”:
U512
The following optional runtime args can also be provided:
- “to”:
Option<AccountHash>
- “id”:
Option<u64>
Burn
The burn
native entry point, used to burn Motes
from a source purse.
Requires the following runtime args:
- “source”:
URef
- “amount”:
U512
AddBid
The add_bid
native entry point, used to create or top off a bid purse.
Requires the following runtime args:
- “public_key”:
PublicKey
- “delegation_rate”:
u8
- “amount”:
U512
- “minimum_delegation_amount”:
Option<u64>
- “maximum_delegation_amount”:
Option<u64>
- “reserved_slots”:
Option<u32>
WithdrawBid
The withdraw_bid
native entry point, used to decrease a stake.
Requires the following runtime args:
- “public_key”:
PublicKey
- “amount”:
U512
Delegate
The delegate
native entry point, used to add a new delegator or increase an existing
delegator’s stake.
Requires the following runtime args:
- “delegator”:
PublicKey
- “validator”:
PublicKey
- “amount”:
U512
Undelegate
The undelegate
native entry point, used to reduce a delegator’s stake or remove the
delegator if the remaining stake is 0.
Requires the following runtime args:
- “delegator”:
PublicKey
- “validator”:
PublicKey
- “amount”:
U512
Redelegate
The redelegate
native entry point, used to reduce a delegator’s stake or remove the
delegator if the remaining stake is 0, and after the unbonding delay, automatically
delegate to a new validator.
Requires the following runtime args:
- “delegator”:
PublicKey
- “validator”:
PublicKey
- “amount”:
U512
- “new_validator”:
PublicKey
ActivateBid
The activate bid
native entry point, used to reactivate an inactive bid.
Requires the following runtime args:
- “validator_public_key”:
PublicKey
ChangeBidPublicKey
The change_bid_public_key
native entry point, used to change a bid’s public key.
Requires the following runtime args:
- “public_key”:
PublicKey
- “new_public_key”:
PublicKey
AddReservations
The add_reservations
native entry point, used to add delegators to validator’s reserve
list.
Requires the following runtime args:
- “reservations”:
Vec<Reservation>
CancelReservations
The cancel_reservations
native entry point, used to remove delegators from validator’s
reserve list.
Requires the following runtime args:
- “validator”:
PublicKey
- “delegators”:
Vec<DelegatorKind>
Implementations§
Trait Implementations§
Source§impl Clone for TransactionEntryPoint
impl Clone for TransactionEntryPoint
Source§fn clone(&self) -> TransactionEntryPoint
fn clone(&self) -> TransactionEntryPoint
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl DataSize for TransactionEntryPoint
impl DataSize for TransactionEntryPoint
Source§const IS_DYNAMIC: bool = true
const IS_DYNAMIC: bool = true
true
, the type has a heap size that can vary at runtime, depending on the actual value.Source§const STATIC_HEAP_SIZE: usize = 0usize
const STATIC_HEAP_SIZE: usize = 0usize
IS_DYNAMIC
is false, this is
the total amount of heap memory occupied by the value. Otherwise this is a lower bound.Source§fn estimate_heap_size(&self) -> usize
fn estimate_heap_size(&self) -> usize
Source§impl Debug for TransactionEntryPoint
impl Debug for TransactionEntryPoint
Source§impl Default for TransactionEntryPoint
impl Default for TransactionEntryPoint
Source§fn default() -> TransactionEntryPoint
fn default() -> TransactionEntryPoint
Source§impl<'de> Deserialize<'de> for TransactionEntryPoint
impl<'de> Deserialize<'de> for TransactionEntryPoint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for TransactionEntryPoint
impl Display for TransactionEntryPoint
Source§impl From<&str> for TransactionEntryPoint
impl From<&str> for TransactionEntryPoint
Source§impl FromBytes for TransactionEntryPoint
impl FromBytes for TransactionEntryPoint
Source§impl Hash for TransactionEntryPoint
impl Hash for TransactionEntryPoint
Source§impl JsonSchema for TransactionEntryPoint
impl JsonSchema for TransactionEntryPoint
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moreSource§impl Ord for TransactionEntryPoint
impl Ord for TransactionEntryPoint
Source§fn cmp(&self, other: &TransactionEntryPoint) -> Ordering
fn cmp(&self, other: &TransactionEntryPoint) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for TransactionEntryPoint
impl PartialEq for TransactionEntryPoint
Source§impl PartialOrd for TransactionEntryPoint
impl PartialOrd for TransactionEntryPoint
Source§impl Serialize for TransactionEntryPoint
impl Serialize for TransactionEntryPoint
Source§impl ToBytes for TransactionEntryPoint
impl ToBytes for TransactionEntryPoint
Source§fn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Vec<u8>
which would be returned from a successful call to
to_bytes()
or into_bytes()
. The data is not actually serialized, so this call is
relatively cheap.impl Eq for TransactionEntryPoint
impl StructuralPartialEq for TransactionEntryPoint
Auto Trait Implementations§
impl Freeze for TransactionEntryPoint
impl RefUnwindSafe for TransactionEntryPoint
impl Send for TransactionEntryPoint
impl Sync for TransactionEntryPoint
impl Unpin for TransactionEntryPoint
impl UnwindSafe for TransactionEntryPoint
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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