Module iota::ptb_command
- Struct
ProgrammableMoveCall - Struct
TransferObjectsData - Struct
SplitCoinsData - Struct
MergeCoinsData - Struct
PublishData - Struct
MakeMoveVecData - Struct
UpgradeData - Enum
Command - Enum
Argument - Function
is_move_call - Function
is_transfer_objects - Function
is_split_coins - Function
is_merge_coins - Function
is_publish - Function
is_make_move_vec - Function
is_upgrade - Function
as_move_call - Function
as_transfer_objects - Function
as_split_coins - Function
as_merge_coins - Function
as_publish - Function
as_make_move_vec - Function
as_upgrade - Function
is_gas_coin - Function
is_input - Function
is_result - Function
is_nested_result - Function
input_index - Function
result_command_index - Function
nested_result_command_index - Function
nested_result_inner_index - Function
package - Function
module_name - Function
function - Function
type_arguments - Function
arguments - Function
objects - Function
recipient - Function
coin - Function
amounts - Function
target_coin - Function
source_coins - Function
modules - Function
dependencies - Function
type_arg - Function
elements - Function
upgrade_modules - Function
upgrade_dependencies - Function
upgrade_package - Function
upgrade_ticket
use iota::address;
use iota::hex;
use iota::object;
use iota::tx_context;
use std::address;
use std::ascii;
use std::bcs;
use std::option;
use std::string;
use std::type_name;
use std::vector;
Struct ProgrammableMoveCall
public struct ProgrammableMoveCall has copy, drop
Fields
Struct TransferObjectsData
public struct TransferObjectsData has copy, drop
Fields
Struct SplitCoinsData
public struct SplitCoinsData has copy, drop
Fields
Struct MergeCoinsData
public struct MergeCoinsData has copy, drop
Struct PublishData
public struct PublishData has copy, drop
Fields
modules: vector<vector<u8>>dependencies: vector<iota::object::ID>
Struct MakeMoveVecData
public struct MakeMoveVecData has copy, drop
Fields
Struct UpgradeData
public struct UpgradeData has copy, drop
Fields
modules: vector<vector<u8>>dependencies: vector<iota::object::ID>package: iota::object::IDupgrade_ticket: iota::ptb_command::Argument
Enum Command
public enum Command has copy, drop
Variants
Variant
MoveCallVariant
TransferObjectsVariant
SplitCoinsVariant
MergeCoinsVariant
PublishVariant
MakeMoveVecVariant
Upgrade
Enum Argument
public enum Argument has copy, drop
Variants
Variant
GasCoinVariant
Input0: u16Variant
Result0: u16Variant
NestedResult0: u161: u16
Function is_move_call
public fun is_move_call(command: &iota::ptb_command::Command): bool
Implementation
public fun is_move_call(command: &Command): bool {
match (command) {
Command::MoveCall(_) => true,
_ => false,
}
}
Function is_transfer_objects
public fun is_transfer_objects(command: &iota::ptb_command::Command): bool
Implementation
public fun is_transfer_objects(command: &Command): bool {
match (command) {
Command::TransferObjects(_) => true,
_ => false,
}
}
Function is_split_coins
public fun is_split_coins(command: &iota::ptb_command::Command): bool
Implementation
public fun is_split_coins(command: &Command): bool {
match (command) {
Command::SplitCoins(_) => true,
_ => false,
}
}
Function is_merge_coins
public fun is_merge_coins(command: &iota::ptb_command::Command): bool
Implementation
public fun is_merge_coins(command: &Command): bool {
match (command) {
Command::MergeCoins(_) => true,
_ => false,
}
}
Function is_publish
public fun is_publish(command: &iota::ptb_command::Command): bool
Implementation
public fun is_publish(command: &Command): bool {
match (command) {
Command::Publish(_) => true,
_ => false,
}
}
Function is_make_move_vec
public fun is_make_move_vec(command: &iota::ptb_command::Command): bool
Implementation
public fun is_make_move_vec(command: &Command): bool {
match (command) {
Command::MakeMoveVec(_) => true,
_ => false,
}
}
Function is_upgrade
public fun is_upgrade(command: &iota::ptb_command::Command): bool
Implementation
public fun is_upgrade(command: &Command): bool {
match (command) {
Command::Upgrade(_) => true,
_ => false,
}
}
Function as_move_call
public fun as_move_call(command: &iota::ptb_command::Command): std::option::Option<iota::ptb_command::ProgrammableMoveCall>
Implementation
public fun as_move_call(command: &Command): Option<ProgrammableMoveCall> {
match (command) {
Command::MoveCall(call) => some(*call),
_ => none(),
}
}
Function as_transfer_objects
public fun as_transfer_objects(command: &iota::ptb_command::Command): std::option::Option<iota::ptb_command::TransferObjectsData>
Implementation
public fun as_transfer_objects(command: &Command): Option<TransferObjectsData> {
match (command) {
Command::TransferObjects(data) => some(*data),
_ => none(),
}
}
Function as_split_coins
public fun as_split_coins(command: &iota::ptb_command::Command): std::option::Option<iota::ptb_command::SplitCoinsData>
Implementation
public fun as_split_coins(command: &Command): Option<SplitCoinsData> {
match (command) {
Command::SplitCoins(data) => some(*data),
_ => none(),
}
}
Function as_merge_coins
public fun as_merge_coins(command: &iota::ptb_command::Command): std::option::Option<iota::ptb_command::MergeCoinsData>
Implementation
public fun as_merge_coins(command: &Command): Option<MergeCoinsData> {
match (command) {
Command::MergeCoins(data) => some(*data),
_ => none(),
}
}
Function as_publish
public fun as_publish(command: &iota::ptb_command::Command): std::option::Option<iota::ptb_command::PublishData>
Implementation
public fun as_publish(command: &Command): Option<PublishData> {
match (command) {
Command::Publish(data) => some(*data),
_ => none(),
}
}
Function as_make_move_vec
public fun as_make_move_vec(command: &iota::ptb_command::Command): std::option::Option<iota::ptb_command::MakeMoveVecData>
Implementation
public fun as_make_move_vec(command: &Command): Option<MakeMoveVecData> {
match (command) {
Command::MakeMoveVec(data) => some(*data),
_ => none(),
}
}
Function as_upgrade
public fun as_upgrade(command: &iota::ptb_command::Command): std::option::Option<iota::ptb_command::UpgradeData>
Implementation
public fun as_upgrade(command: &Command): Option<UpgradeData> {
match (command) {
Command::Upgrade(data) => some(*data),
_ => none(),
}
}
Function is_gas_coin
public fun is_gas_coin(arg: &iota::ptb_command::Argument): bool
Implementation
public fun is_gas_coin(arg: &Argument): bool {
match (arg) {
Argument::GasCoin => true,
_ => false,
}
}
Function is_input
public fun is_input(arg: &iota::ptb_command::Argument): bool
Implementation
Function is_result
public fun is_result(arg: &iota::ptb_command::Argument): bool
Implementation
Function is_nested_result
public fun is_nested_result(arg: &iota::ptb_command::Argument): bool
Implementation
public fun is_nested_result(arg: &Argument): bool {
match (arg) {
Argument::NestedResult(_, _) => true,
_ => false,
}
}
Function input_index
public fun input_index(arg: &iota::ptb_command::Argument): std::option::Option<u16>
Implementation
public fun input_index(arg: &Argument): Option<u16> {
match (arg) {
Argument::Input(index) => some(*index),
_ => none(),
}
}
Function result_command_index
public fun result_command_index(arg: &iota::ptb_command::Argument): std::option::Option<u16>
Implementation
public fun result_command_index(arg: &Argument): Option<u16> {
match (arg) {
Argument::Result(command_index) => some(*command_index),
_ => none(),
}
}