Transferring to Sui through contract, indicating insufficient gas

If there are multiple object IDs, there is no problem. If there is only one, it will report insufficient gas

public entry fun withdraw(coin: &mut Coin, recipient: address, amount: u64, ctx: &mut TxContext) {
assert!(tx_context::sender(ctx) == MODULE_OWNER, INVALID_TOKEN_OWNER);
assert!(amount > 0, ERR_INCORRECT_AMOUNT);
pay::split_and_transfer(coin, amount, recipient, ctx);

}
12 Likes

That’s great :smiley:

Blockquote

1 Like