Module iota::pay
This module provides handy functionality for wallets and iota::Coin management.
- Constants
- Function
keep - Function
split - Function
split_vec - Function
split_and_transfer - Function
divide_and_keep - Function
join_vec - Function
join_vec_and_transfer
use iota::address;
use iota::bag;
use iota::balance;
use iota::coin;
use iota::config;
use iota::deny_list;
use iota::dynamic_field;
use iota::dynamic_object_field;
use iota::event;
use iota::hex;
use iota::object;
use iota::transfer;
use iota::tx_context;
use iota::types;
use iota::url;
use std::address;
use std::ascii;
use std::bcs;
use std::option;
use std::string;
use std::type_name;
use std::vector;
Constants
For when empty vector is supplied into join function.
const ENoCoins: u64 = 0;
Function keep
Transfer c to the sender of the current transaction
public fun keep<T>(c: iota::coin::Coin<T>, ctx: &iota::tx_context::TxContext)
Implementation
public fun keep<T>(c: Coin<T>, ctx: &TxContext) {
transfer::public_transfer(c, ctx.sender())
}