So, what I think you want to do is use the coin from the split (using the appropriate amount to satisfy the move call), do not transfer to yourself, and use that coin[0] for the move call.
hey bro, i have the same question for this, can you tell me how can get coinObjectId when splitCoins, because the contract need a coin type value but the result of splitCoin is not ,
I’m sorry to bother you, but I really need your help
sry,bro
i use this demo [coins] = trx.splitCoins(trx.gas, [1000000000]) trx.moveCall({target: '', arguments: [trx.pure("NFT"), coins[0)]) signAndExecuteTransactionBlock({...})
got a mistake
coin[0] is undefind
so what can i do anything before set the coin to arg