Module 0xa9::token_a
use 0x1::option;
use 0x2::coin;
use 0x2::transfer;
use 0x2::tx_context;
use 0x2::url;
Struct TOKEN_A
struct TOKEN_A has drop
Fields
-
dummy_field: bool
-
Function init
fun init(witness: token_a::TOKEN_A, ctx: &mut tx_context::TxContext)
Implementation
fun init(witness: TOKEN_A, ctx: &mut TxContext) {
let (treasury_cap, coin_metadata) = coin::create_currency(
witness,
9,
b"TOKEN1",
b"Token 1",
b"",
option::none(),
ctx,
);
transfer::public_transfer(treasury_cap, tx_context::sender(ctx));
transfer::public_transfer(coin_metadata, tx_context::sender(ctx));
}