Enum concordium_base::transactions::Payload
source · pub enum Payload {
Show 21 variants
DeployModule {
module: WasmModule,
},
InitContract {
payload: InitContractPayload,
},
Update {
payload: UpdateContractPayload,
},
Transfer {
to_address: AccountAddress,
amount: Amount,
},
AddBaker {
payload: Box<AddBakerPayload>,
},
RemoveBaker,
UpdateBakerStake {
stake: Amount,
},
UpdateBakerRestakeEarnings {
restake_earnings: bool,
},
UpdateBakerKeys {
payload: Box<BakerUpdateKeysPayload>,
},
UpdateCredentialKeys {
cred_id: CredentialRegistrationID,
keys: CredentialPublicKeys,
},
EncryptedAmountTransfer {
to: AccountAddress,
data: Box<EncryptedAmountTransferData<EncryptedAmountsCurve>>,
},
TransferToEncrypted {
amount: Amount,
},
TransferToPublic {
data: Box<SecToPubAmountTransferData<EncryptedAmountsCurve>>,
},
TransferWithSchedule {
to: AccountAddress,
schedule: Vec<(Timestamp, Amount)>,
},
UpdateCredentials {
new_cred_infos: AccountCredentialsMap,
remove_cred_ids: Vec<CredentialRegistrationID>,
new_threshold: AccountThreshold,
},
RegisterData {
data: RegisteredData,
},
TransferWithMemo {
to_address: AccountAddress,
memo: Memo,
amount: Amount,
},
EncryptedAmountTransferWithMemo {
to: AccountAddress,
memo: Memo,
data: Box<EncryptedAmountTransferData<EncryptedAmountsCurve>>,
},
TransferWithScheduleAndMemo {
to: AccountAddress,
memo: Memo,
schedule: Vec<(Timestamp, Amount)>,
},
ConfigureBaker {
data: Box<ConfigureBakerPayload>,
},
ConfigureDelegation {
data: ConfigureDelegationPayload,
},
}
Expand description
Payload of an account transaction.
Variants§
DeployModule
Fields
module: WasmModule
Deploy a Wasm module with the given source.
InitContract
Fields
payload: InitContractPayload
Initialize a new smart contract instance.
Update
Fields
payload: UpdateContractPayload
Update a smart contract instance by invoking a specific function.
Transfer
Transfer CCD to an account.
AddBaker
Fields
payload: Box<AddBakerPayload>
Register the sender account as a baker.
RemoveBaker
Deregister the account as a baker.
UpdateBakerStake
Update baker’s stake.
UpdateBakerRestakeEarnings
Modify whether to add earnings to the baker stake automatically or not.
UpdateBakerKeys
Fields
payload: Box<BakerUpdateKeysPayload>
Update the baker’s keys.
UpdateCredentialKeys
Fields
cred_id: CredentialRegistrationID
Id of the credential whose keys are to be updated.
keys: CredentialPublicKeys
The new public keys.
Update signing keys of a specific credential.
EncryptedAmountTransfer
Fields
to: AccountAddress
The recepient’s address.
data: Box<EncryptedAmountTransferData<EncryptedAmountsCurve>>
The (encrypted) amount to transfer and proof of correctness of accounting.
Transfer an encrypted amount.
TransferToEncrypted
Transfer from public to encrypted balance of the sender account.
TransferToPublic
Fields
data: Box<SecToPubAmountTransferData<EncryptedAmountsCurve>>
The amount to transfer and proof of correctness of accounting.
Transfer an amount from encrypted to the public balance of the account.
TransferWithSchedule
Fields
to: AccountAddress
The recepient.
Transfer an amount with schedule.
UpdateCredentials
Fields
new_cred_infos: AccountCredentialsMap
New credentials to add.
remove_cred_ids: Vec<CredentialRegistrationID>
Ids of credentials to remove.
new_threshold: AccountThreshold
The new account threshold.
Update the account’s credentials.
RegisterData
Fields
data: RegisteredData
The data to register.
Register the given data on the chain.
TransferWithMemo
Fields
to_address: AccountAddress
Address to send to.
Transfer CCD to an account with an additional memo.
EncryptedAmountTransferWithMemo
Fields
to: AccountAddress
The recepient’s address.
data: Box<EncryptedAmountTransferData<EncryptedAmountsCurve>>
The (encrypted) amount to transfer and proof of correctness of accounting.
Transfer an encrypted amount.
TransferWithScheduleAndMemo
Fields
to: AccountAddress
The recepient.
Transfer an amount with schedule.
ConfigureBaker
Fields
data: Box<ConfigureBakerPayload>
Configure a baker on an account.
ConfigureDelegation
Fields
Configure an account’s stake delegation.
Implementations§
source§impl Payload
impl Payload
sourcepub fn transaction_type(&self) -> TransactionType
pub fn transaction_type(&self) -> TransactionType
Resolve the TransactionType corresponding to the variant of the Payload.
Trait Implementations§
source§impl Deserial for Payload
impl Deserial for Payload
fn deserial<R: ReadBytesExt>(source: &mut R) -> ParseResult<Self>
source§impl<'de> Deserialize<'de> for Payload
impl<'de> Deserialize<'de> for Payload
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 PayloadLike for Payload
impl PayloadLike for Payload
source§fn encode(&self) -> EncodedPayload
fn encode(&self) -> EncodedPayload
source§fn encode_to_buffer<B: Buffer>(&self, out: &mut B)
fn encode_to_buffer<B: Buffer>(&self, out: &mut B)
encode
. However this will only matter if serialization
was to be done in a tight loop.Auto Trait Implementations§
impl Freeze for Payload
impl RefUnwindSafe for Payload
impl Send for Payload
impl Sync for Payload
impl Unpin for Payload
impl UnwindSafe for Payload
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> 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> Pointable for T
impl<T> Pointable for T
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.