# Call fun with generic type

**URL:** <https://forums.sui.io/t/call-fun-with-generic-type/45645>\
**Category:** Move\
**Created:** [May 29, 2024, 4:44am UTC](https://forums.sui.io/t/call-fun-with-generic-type/45645 "2024-05-29T04:44:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cryptojame](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/cryptojame/32/30801_2.png) [@cryptojame](https://forums.sui.io/u/cryptojame)\
**Post date:** [May 29, 2024, 4:44am UTC](https://forums.sui.io/t/call-fun-with-generic-type/45645/1 "2024-05-29T04:44:27Z")

</div>

Hi,  
I’m new bie, im created a function with generic type so how does call this function via sui cli?  
code sample

```auto
public entry fun new<T>(
        ctx: &mut TxContext,
    ) {
        let pool = Pool {
            id: object::new(ctx),
            treasury: balance::zero<T>(),
        };

        transfer::share_object(pool);
}

```

Thanks

---

<div class="post-metadata">

**Author:** ![cryptojame](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/cryptojame/32/30801_2.png) [@cryptojame](https://forums.sui.io/u/cryptojame)\
**Post date:** [May 29, 2024, 8:37am UTC](https://forums.sui.io/t/call-fun-with-generic-type/45645/3 "2024-05-29T08:37:57Z")

</div>

Still not resolved it.

---

<div class="post-metadata">

**Author:** ![cryptojame](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/cryptojame/32/30801_2.png) [@cryptojame](https://forums.sui.io/u/cryptojame)\
**Post date:** [May 29, 2024, 10:10am UTC](https://forums.sui.io/t/call-fun-with-generic-type/45645/5 "2024-05-29T10:10:46Z")

</div>

Hi HP02,  
I don’t see the button or link to go to live chat at the bottom corner.

---

<div class="post-metadata">

**Author:** ![cryptojame](https://dub1.discourse-cdn.com/sui/user_avatar/forums.sui.io/cryptojame/32/30801_2.png) [@cryptojame](https://forums.sui.io/u/cryptojame)\
**Post date:** [May 29, 2024, 10:46am UTC](https://forums.sui.io/t/call-fun-with-generic-type/45645/6 "2024-05-29T10:46:52Z")

</div>

My issue has been resolved,  
Thanks all.
