pub enum ExecutableDeployItem {
ModuleBytes {
module_bytes: Bytes,
args: RuntimeArgs,
},
StoredContractByHash {
hash: ContractHash,
entry_point: String,
args: RuntimeArgs,
},
StoredContractByName {
name: String,
entry_point: String,
args: RuntimeArgs,
},
StoredVersionedContractByHash {
hash: ContractPackageHash,
version: Option<ContractVersion>,
entry_point: String,
args: RuntimeArgs,
},
StoredVersionedContractByName {
name: String,
version: Option<ContractVersion>,
entry_point: String,
args: RuntimeArgs,
},
Transfer {
args: RuntimeArgs,
},
}Expand description
The payment or session code of a Deploy.
Variants§
ModuleBytes
Raw bytes of compiled Wasm code, which must include a call entry point, and the arguments
to call at runtime.
Fields
args: RuntimeArgsThe arguments to be passed to the entry point at runtime.
StoredContractByHash
A contract stored in global state, referenced by its “hash”, along with the entry point and arguments to call at runtime.
Fields
hash: ContractHashThe contract’s identifier.
args: RuntimeArgsThe arguments to be passed to the entry point at runtime.
StoredContractByName
A contract stored in global state, referenced by a named key existing in the Deploy’s
account context, along with the entry point and arguments to call at runtime.
Fields
args: RuntimeArgsThe arguments to be passed to the entry point at runtime.
StoredVersionedContractByHash
A versioned contract stored in global state, referenced by its “hash”, along with the entry point and arguments to call at runtime.
Fields
hash: ContractPackageHashThe contract package’s identifier.
version: Option<ContractVersion>The version of the contract to call. If None, the highest enabled version is used.
args: RuntimeArgsThe arguments to be passed to the entry point at runtime.
StoredVersionedContractByName
A versioned contract stored in global state, referenced by a named key existing in the
Deploy’s account context, along with the entry point and arguments to call at runtime.
Fields
version: Option<ContractVersion>The version of the contract to call. If None, the highest enabled version is used.
args: RuntimeArgsThe arguments to be passed to the entry point at runtime.
Transfer
A native transfer which does not contain or reference any Wasm code.
Fields
args: RuntimeArgsThe arguments to be passed to the native transfer entry point at runtime.
Implementations§
Source§impl ExecutableDeployItem
impl ExecutableDeployItem
Sourcepub fn new_module_bytes(module_bytes: Bytes, args: RuntimeArgs) -> Self
pub fn new_module_bytes(module_bytes: Bytes, args: RuntimeArgs) -> Self
Returns a new ExecutableDeployItem::ModuleBytes.
Sourcepub fn new_standard_payment<A: Into<U512>>(amount: A) -> Self
pub fn new_standard_payment<A: Into<U512>>(amount: A) -> Self
Returns a new ExecutableDeployItem::ModuleBytes suitable for use as standard payment code
of a Deploy.
Sourcepub fn new_stored_contract_by_hash(
hash: ContractHash,
entry_point: String,
args: RuntimeArgs,
) -> Self
pub fn new_stored_contract_by_hash( hash: ContractHash, entry_point: String, args: RuntimeArgs, ) -> Self
Returns a new ExecutableDeployItem::StoredContractByHash.
Sourcepub fn new_stored_contract_by_name(
name: String,
entry_point: String,
args: RuntimeArgs,
) -> Self
pub fn new_stored_contract_by_name( name: String, entry_point: String, args: RuntimeArgs, ) -> Self
Returns a new ExecutableDeployItem::StoredContractByName.
Sourcepub fn new_stored_versioned_contract_by_hash(
hash: ContractPackageHash,
version: Option<ContractVersion>,
entry_point: String,
args: RuntimeArgs,
) -> Self
pub fn new_stored_versioned_contract_by_hash( hash: ContractPackageHash, version: Option<ContractVersion>, entry_point: String, args: RuntimeArgs, ) -> Self
Returns a new ExecutableDeployItem::StoredVersionedContractByHash.
Sourcepub fn new_stored_versioned_contract_by_name(
name: String,
version: Option<ContractVersion>,
entry_point: String,
args: RuntimeArgs,
) -> Self
pub fn new_stored_versioned_contract_by_name( name: String, version: Option<ContractVersion>, entry_point: String, args: RuntimeArgs, ) -> Self
Returns a new ExecutableDeployItem::StoredVersionedContractByName.
Sourcepub fn new_transfer<A: Into<U512>>(
amount: A,
maybe_source: Option<URef>,
target: TransferTarget,
maybe_transfer_id: Option<u64>,
) -> Self
pub fn new_transfer<A: Into<U512>>( amount: A, maybe_source: Option<URef>, target: TransferTarget, maybe_transfer_id: Option<u64>, ) -> Self
Returns a new ExecutableDeployItem suitable for use as session code for a transfer.
If maybe_source is None, the account’s main purse is used as the source.
Trait Implementations§
Source§impl Clone for ExecutableDeployItem
impl Clone for ExecutableDeployItem
Source§fn clone(&self) -> ExecutableDeployItem
fn clone(&self) -> ExecutableDeployItem
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecutableDeployItem
impl Debug for ExecutableDeployItem
Source§impl<'de> Deserialize<'de> for ExecutableDeployItem
impl<'de> Deserialize<'de> for ExecutableDeployItem
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 Hash for ExecutableDeployItem
impl Hash for ExecutableDeployItem
Source§impl Ord for ExecutableDeployItem
impl Ord for ExecutableDeployItem
Source§fn cmp(&self, other: &ExecutableDeployItem) -> Ordering
fn cmp(&self, other: &ExecutableDeployItem) -> 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 ExecutableDeployItem
impl PartialEq for ExecutableDeployItem
Source§impl PartialOrd for ExecutableDeployItem
impl PartialOrd for ExecutableDeployItem
Source§impl Serialize for ExecutableDeployItem
impl Serialize for ExecutableDeployItem
Source§impl ToBytes for ExecutableDeployItem
impl ToBytes for ExecutableDeployItem
Source§fn write_bytes(&self, buffer: &mut Vec<u8>) -> Result<(), Error>
fn write_bytes(&self, buffer: &mut Vec<u8>) -> Result<(), Error>
&self into a mutable writer.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 ExecutableDeployItem
impl StructuralPartialEq for ExecutableDeployItem
Auto Trait Implementations§
impl Freeze for ExecutableDeployItem
impl RefUnwindSafe for ExecutableDeployItem
impl Send for ExecutableDeployItem
impl Sync for ExecutableDeployItem
impl Unpin for ExecutableDeployItem
impl UnwindSafe for ExecutableDeployItem
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> 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> PipeAsRef for T
impl<T> PipeAsRef for T
Source§impl<T> PipeBorrow for T
impl<T> PipeBorrow for T
Source§impl<T> PipeDeref for T
impl<T> PipeDeref for T
Source§impl<T> PipeRef for T
impl<T> PipeRef for T
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
Source§fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
tap in debug builds, and does nothing in release builds.Source§fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
Source§fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
tap_mut in debug builds, and does nothing in release builds.Source§impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
Source§fn tap_ref<F, R>(self, func: F) -> Self
fn tap_ref<F, R>(self, func: F) -> Self
Source§fn tap_ref_dbg<F, R>(self, func: F) -> Self
fn tap_ref_dbg<F, R>(self, func: F) -> Self
tap_ref in debug builds, and does nothing in release builds.Source§fn tap_ref_mut<F, R>(self, func: F) -> Self
fn tap_ref_mut<F, R>(self, func: F) -> Self
Source§impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
Source§fn tap_borrow<F, R>(self, func: F) -> Self
fn tap_borrow<F, R>(self, func: F) -> Self
Source§fn tap_borrow_dbg<F, R>(self, func: F) -> Self
fn tap_borrow_dbg<F, R>(self, func: F) -> Self
tap_borrow in debug builds, and does nothing in release builds.Source§fn tap_borrow_mut<F, R>(self, func: F) -> Self
fn tap_borrow_mut<F, R>(self, func: F) -> Self
Source§impl<T> TapDeref for T
impl<T> TapDeref for T
Source§fn tap_deref_dbg<F, R>(self, func: F) -> Self
fn tap_deref_dbg<F, R>(self, func: F) -> Self
tap_deref in debug builds, and does nothing in release builds.Source§fn tap_deref_mut<F, R>(self, func: F) -> Self
fn tap_deref_mut<F, R>(self, func: F) -> Self
self for modification.