I have a function in move contract that uses a vector of a dummy coin as a parameter this is owned by a nft that the caller of the function own. And the function wants to send the coin to another nft. The function signature is like this:
public fun send_dummy_coin(
recipient_nft: address,
user_coins: vector<Receiving<Coin<DUMMY>>>,
amount: u64,
ctx: &mut TxContext
) {
Now in the frontend part how can I call the send_dummy_coin function. I am doing in the way but it is giving me error:
const trx = new TransactionBlock();
trx.moveCall({
target: `${PACKAGE_ADDRESS}::protocol::send_dummy_coin`,
arguments: [
trx.pure("0x572666", "address"),
trx.makeMoveVec({objects: [trx.object("0x23554652...")]}),
trx.pure((10**9), "u64"),
],
});
0x23554652..." is the dummy coin token object id owned by the nft. What will be the syntax in the frontend?