pub enum Command {
MoveCall(Box<MoveCall>),
TransferObjects(Vec<Argument>, Argument),
SplitCoins(Argument, Vec<Argument>),
MergeCoins(Argument, Vec<Argument>),
Publish(Vec<Vec<u8>>, Vec<Address>),
MakeMoveVec(Option<TypeTag>, Vec<Argument>),
Upgrade(Vec<Vec<u8>>, Vec<Address>, Address, Argument),
}
Expand description
A single command in a programmable transaction.
This type is here for backwards compatibility purposes, as sui_sdk_types::Command
has a different shape that would be incompatible with the ptb!
syntax.
The actual resulting ProgrammableTransaction
does not contain this type.
Variants§
MoveCall(Box<MoveCall>)
A call to either an entry or a public Move function.
Either an entry function or a public function (which cannot return references).
TransferObjects(Vec<Argument>, Argument)
(Vec<forall T:key+store. T>, address)
It sends n-objects to the specified address. These objects must have store
(public transfer) and either the previous owner must be an address or the object must
be newly created.
SplitCoins(Argument, Vec<Argument>)
(&mut Coin<T>, Vec<u64>)
-> Vec<Coin<T>>
It splits off some amounts into a new coins with those amounts
MergeCoins(Argument, Vec<Argument>)
(&mut Coin<T>, Vec<Coin<T>>)
It merges n-coins into the first coin
Publish(Vec<Vec<u8>>, Vec<Address>)
Publishes a Move package. It takes the package bytes and a list of the package’s transitive dependencies to link against on-chain.
MakeMoveVec(Option<TypeTag>, Vec<Argument>)
forall T: Vec<T> -> vector<T>
Given n-values of the same type, it constructs a vector. For non objects or an empty vector,
the type tag must be specified.
Upgrade(Vec<Vec<u8>>, Vec<Address>, Address, Argument)
Upgrades a Move package Takes (in order):
- A vector of serialized modules for the package.
- A vector of object ids for the transitive dependencies of the new package.
- The object ID of the package being upgraded.
- An argument holding the
UpgradeTicket
that must have been produced from an earlier command in the same programmable transaction.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Command
impl<'de> Deserialize<'de> for Command
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>,
impl Eq for Command
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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> 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<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