Skip to main content

Module iota::ptb_call_arg

use iota::address; use iota::hex; use iota::object; use iota::tx_context; use std::ascii; use std::bcs; use std::option; use std::string; use std::vector;

Structs

struct ObjectRef

public struct ObjectRef has copy, drop

Fields

pub digest

public fun digest(obj_ref: &iota::ptb_call_arg::ObjectRef): &vector

Implementation

public fun digest(obj_ref: &ObjectRef): &vector {     &obj_ref.object_digest }

pub id

public fun id(obj_ref: &iota::ptb_call_arg::ObjectRef): &iota::object::ID

Implementation

public fun id(obj_ref: &ObjectRef): &ID {     &obj_ref.object_id }

pub sequence_number

public fun sequence_number(obj_ref: &iota::ptb_call_arg::ObjectRef): u64

Implementation

public fun sequence_number(obj_ref: &ObjectRef): u64 {     obj_ref.sequence_number }

Enums

enum CallArg

public enum CallArg has copy, drop

Variants

Variant PureData

0: vector<u8>

Variant ObjectData

0: iota::ptb_call_arg::ObjectArg

pub as_object_data

public fun as_object_data(arg: &iota::ptb_call_arg::CallArg): std::option::Option<iota::ptb_call_arg::ObjectArg>

Implementation

public fun as_object_data(arg: &CallArg): Option<ObjectArg> {     match (arg) {         CallArg::ObjectData(obj) => some(*obj),         _ => none(),     } }

pub as_pure_data

public fun as_pure_data(arg: &iota::ptb_call_arg::CallArg): std::option::Option<vector<u8>>

Implementation

public fun as_pure_data(arg: &CallArg): Option<vector<u8>> {     match (arg) {         CallArg::PureData(data) => some(*data),         _ => none(),     } }

pub is_object_data

public fun is_object_data(arg: &iota::ptb_call_arg::CallArg): bool

Implementation

public fun is_object_data(arg: &CallArg): bool {     match (arg) {         CallArg::ObjectData() => true,          => false,     } }

pub is_pure_data

public fun is_pure_data(arg: &iota::ptb_call_arg::CallArg): bool

Implementation

public fun is_pure_data(arg: &CallArg): bool {     match (arg) {         CallArg::PureData() => true,          => false,     } }

enum ObjectArg

public enum ObjectArg has copy, drop

Variants

Variant ImmOrOwnedObject

0: iota::ptb_call_arg::ObjectRef

Variant SharedObject

id: iota::object::ID
initial_shared_version: u64
mutable: bool

Variant ReceivingObject

0: iota::ptb_call_arg::ObjectRef

pub is_imm_or_owned_object

public fun is_imm_or_owned_object(obj_arg: &iota::ptb_call_arg::ObjectArg): bool

Implementation

public fun is_imm_or_owned_object(obj_arg: &ObjectArg): bool {     match (obj_arg) {         ObjectArg::ImmOrOwnedObject() => true,          => false,     } }

pub is_mutable_shared_object

public fun is_mutable_shared_object(obj_arg: &iota::ptb_call_arg::ObjectArg): std::option::Option<bool>

Implementation

public fun is_mutable_shared_object(obj_arg: &ObjectArg): Option<bool> {     match (obj_arg) {         ObjectArg::SharedObject { id: _, initial_shared_version: , mutable } => some(*mutable),          => none(),     } }

pub is_receiving_object

public fun is_receiving_object(obj_arg: &iota::ptb_call_arg::ObjectArg): bool

Implementation

public fun is_receiving_object(obj_arg: &ObjectArg): bool {     match (obj_arg) {         ObjectArg::ReceivingObject() => true,          => false,     } }

pub is_shared_object

public fun is_shared_object(obj_arg: &iota::ptb_call_arg::ObjectArg): bool

Implementation

public fun is_shared_object(obj_arg: &ObjectArg): bool {     match (obj_arg) {         ObjectArg::SharedObject { id: _, initial_shared_version: , mutable: _ } => true,          => false,     } }

pub object_digest

public fun object_digest(obj_arg: &iota::ptb_call_arg::ObjectArg): std::option::Option<vector<u8>>

Implementation

public fun object_digest(obj_arg: &ObjectArg): Option<vector<u8>> {     match (obj_arg) {         ObjectArg::ImmOrOwnedObject(obj_ref) => some(obj_ref.object_digest),         ObjectArg::ReceivingObject(obj_ref) => some(obj_ref.object_digest),         _ => none(),     } }

pub object_id

public fun object_id(obj_arg: &iota::ptb_call_arg::ObjectArg): std::option::Option<iota::object::ID>

Implementation

public fun object_id(obj_arg: &ObjectArg): Option<ID> {     match (obj_arg) {         ObjectArg::ImmOrOwnedObject(obj_ref) => some(obj_ref.object_id),         ObjectArg::ReceivingObject(obj_ref) => some(obj_ref.object_id),         ObjectArg::SharedObject { id, initial_shared_version: , mutable: _ } => some(*id),          => none(),     } }

pub object_ref

public fun object_ref(obj_arg: &iota::ptb_call_arg::ObjectArg): std::option::Option<iota::ptb_call_arg::ObjectRef>

Implementation

public fun object_ref(obj_arg: &ObjectArg): Option<ObjectRef> {     match (obj_arg) {         ObjectArg::ImmOrOwnedObject(obj_ref) => some(*obj_ref),         ObjectArg::ReceivingObject(obj_ref) => some(*obj_ref),         _ => none(),     } }

pub object_version

public fun object_version(obj_arg: &iota::ptb_call_arg::ObjectArg): std::option::Option<u64>

Implementation

public fun object_version(obj_arg: &ObjectArg): Option<u64> {     match (obj_arg) {         ObjectArg::ImmOrOwnedObject(obj_ref) => some(obj_ref.sequence_number),         ObjectArg::ReceivingObject(obj_ref) => some(obj_ref.sequence_number),         ObjectArg::SharedObject { id: , initial_shared_version, mutable: _ } => some(             *initial_shared_version,         ),          => none(),     } }