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(),
}
}
Function nested_result_command_index
public fun nested_result_command_index(arg: &iota::ptb_command::Argument): std::option::Option<u16>
Implementation
public fun nested_result_command_index(arg: &Argument): Option<u16> {
match (arg) {
Argument::NestedResult(command_index, _) => some(*command_index),
_ => none(),
}
}
Function nested_result_inner_index
public fun nested_result_inner_index(arg: &iota::ptb_command::Argument): std::option::Option<u16>
Implementation
public fun nested_result_inner_index(arg: &Argument): Option<u16> {
match (arg) {
Argument::NestedResult(_, inner_index) => some(*inner_index),
_ => none(),
}
}
Function package
public fun package(call: &iota::ptb_command::ProgrammableMoveCall): &iota::object::ID
Implementation
public fun package(call: &ProgrammableMoveCall): &ID {
&call.package
}
Function module_name
public fun module_name(call: &iota::ptb_command::ProgrammableMoveCall): &std::ascii::String
Implementation
public fun module_name(call: &ProgrammableMoveCall): &String {
&call.module_name
}
Function function
public fun function(call: &iota::ptb_command::ProgrammableMoveCall): &std::ascii::String
Implementation
public fun function(call: &ProgrammableMoveCall): &String {
&call.function
}
Function type_arguments
public fun type_arguments(call: &iota::ptb_command::ProgrammableMoveCall): &vector<std::type_name::TypeName>
Implementation
public fun type_arguments(call: &ProgrammableMoveCall): &vector<TypeName> {
&call.type_arguments
}
Function arguments
public fun arguments(call: &iota::ptb_command::ProgrammableMoveCall): &vector<iota::ptb_command::Argument>
Implementation
public fun arguments(call: &ProgrammableMoveCall): &vector<Argument> {
&call.arguments
}
Function objects
public fun objects(data: &iota::ptb_command::TransferObjectsData): &vector<iota::ptb_command::Argument>
Implementation
public fun objects(data: &TransferObjectsData): &vector<Argument> {
&data.objects
}
Function recipient
public fun recipient(data: &iota::ptb_command::TransferObjectsData): &iota::ptb_command::Argument
Implementation
public fun recipient(data: &TransferObjectsData): &Argument {
&data.recipient
}
Function coin
public fun coin(data: &iota::ptb_command::SplitCoinsData): &iota::ptb_command::Argument
Implementation
public fun coin(data: &SplitCoinsData): &Argument {
&data.coin
}
Function amounts
public fun amounts(data: &iota::ptb_command::SplitCoinsData): &vector<iota::ptb_command::Argument>
Implementation
public fun amounts(data: &SplitCoinsData): &vector<Argument> {
&data.amounts
}
Function target_coin
public fun target_coin(data: &iota::ptb_command::MergeCoinsData): &iota::ptb_command::Argument
Implementation
public fun target_coin(data: &MergeCoinsData): &Argument {
&data.target_coin
}
Function source_coins
public fun source_coins(data: &iota::ptb_command::MergeCoinsData): &vector<iota::ptb_command::Argument>
Implementation
public fun source_coins(data: &MergeCoinsData): &vector<Argument> {
&data.source_coins
}
Function modules
public fun modules(data: &iota::ptb_command::PublishData): &vector<vector<u8>>
Implementation
public fun modules(data: &PublishData): &vector<vector<u8>> {
&data.modules
}
Function dependencies
public fun dependencies(data: &iota::ptb_command::PublishData): &vector<iota::object::ID>
Implementation
public fun dependencies(data: &PublishData): &vector<ID> {
&data.dependencies
}
Function type_arg
public fun type_arg(data: &iota::ptb_command::MakeMoveVecData): &std::option::Option<std::type_name::TypeName>
Implementation
public fun type_arg(data: &MakeMoveVecData): &Option<TypeName> {
&data.type_arg
}
Function elements
public fun elements(data: &iota::ptb_command::MakeMoveVecData): &vector<iota::ptb_command::Argument>
Implementation
public fun elements(data: &MakeMoveVecData): &vector<Argument> {
&data.elements
}
Function upgrade_modules
public fun upgrade_modules(data: &iota::ptb_command::UpgradeData): &vector<vector<u8>>
Implementation
public fun upgrade_modules(data: &UpgradeData): &vector<vector<u8>> {
&data.modules
}
Function upgrade_dependencies
public fun upgrade_dependencies(data: &iota::ptb_command::UpgradeData): &vector<iota::object::ID>
Implementation
public fun upgrade_dependencies(data: &UpgradeData): &vector<ID> {
&data.dependencies
}
Function upgrade_package
public fun upgrade_package(data: &iota::ptb_command::UpgradeData): &iota::object::ID
Implementation
public fun upgrade_package(data: &UpgradeData): &ID {
&data.package
}
Function upgrade_ticket
public fun upgrade_ticket(data: &iota::ptb_command::UpgradeData): &iota::ptb_command::Argument
Implementation
public fun upgrade_ticket(data: &UpgradeData): &Argument {
&data.upgrade_ticket
}