pub enum Command {
MoveCall(MoveCall),
TransferObjects(TransferObjects),
SplitCoins(SplitCoins),
MergeCoins(MergeCoins),
Publish(Publish),
MakeMoveVector(MakeMoveVector),
Upgrade(Upgrade),
}
Expand description
A single command in a programmable transaction.
§BCS
The BCS serialized form for this type is defined by the following ABNF:
command = command-move-call
=/ command-transfer-objects
=/ command-split-coins
=/ command-merge-coins
=/ command-publish
=/ command-make-move-vector
=/ command-upgrade
command-move-call = %x00 move-call
command-transfer-objects = %x01 transfer-objects
command-split-coins = %x02 split-coins
command-merge-coins = %x03 merge-coins
command-publish = %x04 publish
command-make-move-vector = %x05 make-move-vector
command-upgrade = %x06 upgrade
Variants§
MoveCall(MoveCall)
A call to either an entry or a public Move function
TransferObjects(TransferObjects)
(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(SplitCoins)
(&mut Coin<T>, Vec<u64>)
-> Vec<Coin<T>>
It splits off some amounts into a new coins with those amounts
MergeCoins(MergeCoins)
(&mut Coin<T>, Vec<Coin<T>>)
It merges n-coins into the first coin
Publish(Publish)
Publishes a Move package. It takes the package bytes and a list of the package’s transitive dependencies to link against on-chain.
MakeMoveVector(MakeMoveVector)
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(Upgrade)
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.
Trait Implementations§
Source§impl Arbitrary for Command
impl Arbitrary for Command
Source§type Parameters = ()
type Parameters = ()
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.Source§type Strategy = BoxedStrategy<Command>
type Strategy = BoxedStrategy<Command>
Strategy
used to generate values of type Self
.Source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
Source§impl<'de> Deserialize<'de> for Command
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for Command
serde
only.