How can i use my deployed coin in the pool

network: testnet
purpose:
i want to set the specific coin in the pool, how can i do ?
my code is below:

public struct Pool has key {
id: UID,
supply_x: Supply<fungible_tokens::ucoin::UCOIN>,
supply_y: Supply<fungible_tokens::faucetucoin::FAUCETUCOIN>
}

fun init(ctx: &mut TxContext) {
let pool = Pool {
id: object::new(ctx),
supply_x: balance::create_supply(UCOIN {}),
supply_y: balance::create_supply(FAUCETUCOIN{})
};
transfer::share_object(pool);
}

1 Like