Hi all,
Im write a init fun to create a shared object below:
fun new_pool(
ctx: &mut TxContext
): Pool {
let sender = ctx.sender();
let pool = Pool {
id: object::new(ctx),
user: ctx.sender();
};
transfer::share_object(pool);
pool
}
but got an error
Invalid usage of previously moved variable 'pool'.
plz suggest for me to fix it.
Thanks.