# Send SUI when calling smart contract function

**URL:** <https://forums.sui.io/t/send-sui-when-calling-smart-contract-function/45343>\
**Category:** Technical Support\
**Tags:** sui\
**Created:** [March 10, 2024, 4:57pm UTC](https://forums.sui.io/t/send-sui-when-calling-smart-contract-function/45343 "2024-03-10T16:57:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tahlil](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/tahlil/32/30688_2.png) [@tahlil](https://forums.sui.io/u/tahlil)\
**Post date:** [March 10, 2024, 4:57pm UTC](https://forums.sui.io/t/send-sui-when-calling-smart-contract-function/45343/1 "2024-03-10T16:57:10Z")

</div>

How can I send Sui when calling an entry smart contract function using SUI SDK not as gas amount (ofc I am assuming I would send gas separately)? What would the entry smart contract would look like, that expect SUI?

---

<div class="post-metadata">

**Author:** ![fastfrank](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/fastfrank/32/1138_2.png) [@fastfrank](https://forums.sui.io/u/fastfrank)\
**Post date:** [March 11, 2024, 10:14am UTC](https://forums.sui.io/t/send-sui-when-calling-smart-contract-function/45343/2 "2024-03-11T10:14:54Z")

</div>

The function in your package/module (smart contract) would have argument like `in_coin:Coin<SUI>`

Assuming TS-SDK it would be `tx.object("0x.....")` where ‘0x…’ is replaced with the coin ID

---

<div class="post-metadata">

**Author:** ![tahlil](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/tahlil/32/30688_2.png) [@tahlil](https://forums.sui.io/u/tahlil)\
**Post date:** [March 12, 2024, 8:32am UTC](https://forums.sui.io/t/send-sui-when-calling-smart-contract-function/45343/3 "2024-03-12T08:32:54Z")

</div>

> [@fastfrank](#):
>
> tx.object

If I split a coin like this:

```auto
const txb = new TransactionBlock();
const [coin] = txb.splitCoins(txb.gas, [txb.pure(100000)]);

```

Should I pass only the `coin` variable

---

<div class="post-metadata">

**Author:** ![fastfrank](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/fastfrank/32/1138_2.png) [@fastfrank](https://forums.sui.io/u/fastfrank)\
**Post date:** [March 12, 2024, 9:45am UTC](https://forums.sui.io/t/send-sui-when-calling-smart-contract-function/45343/4 "2024-03-12T09:45:27Z")

</div>

Yes, the result(s) of a splitCoins can be used in any subsequent command that takes either a coin or object.

---

<div class="post-metadata">

**Author:** ![tahlil](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/tahlil/32/30688_2.png) [@tahlil](https://forums.sui.io/u/tahlil)\
**Post date:** [March 12, 2024, 9:58am UTC](https://forums.sui.io/t/send-sui-when-calling-smart-contract-function/45343/5 "2024-03-12T09:58:06Z")

</div>

Should I need to set the gas amount before splitting the coin?

---

<div class="post-metadata">

**Author:** ![fastfrank](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/fastfrank/32/1138_2.png) [@fastfrank](https://forums.sui.io/u/fastfrank)\
**Post date:** [July 24, 2024, 8:46am UTC](https://forums.sui.io/t/send-sui-when-calling-smart-contract-function/45343/6 "2024-07-24T08:46:08Z")

</div>

If you mean setting the transaction gas budget, not necessary for split coin. But there are a number of variables to consider.

This question was from months ago so I presume you’ve worked it out.
