# Move

**URL:** https://forums.sui.io/c/move/17.md?page=1

[Latest](https://forums.sui.io/latest.md) · [Categories](https://forums.sui.io/categories.md) · [Tags](https://forums.sui.io/tags.md)

**Page:** 2

---

## [Why join function in coin module are entry?](https://forums.sui.io/t/why-join-function-in-coin-module-are-entry/46947)

<div class="topic-metadata">

**Author:** [@melonges](https://forums.sui.io/u/melonges)\
**Replies:** 0\
**Last updated:** [January 3, 2025, 9:23am UTC](https://forums.sui.io/t/why-join-function-in-coin-module-are-entry/46947 "2025-01-03T09:23:18Z")

</div>

public entry fun join\<T\>(self: &mut coin::Coin\<T\>, coin: coin::Coin\<T\>)

---

## [Call other package function without object but with UId](https://forums.sui.io/t/call-other-package-function-without-object-but-with-uid/46728)

<div class="topic-metadata">

**Author:** [@kostiiii](https://forums.sui.io/u/kostiiii)\
**Replies:** 0\
**Last updated:** [December 10, 2024, 11:13am UTC](https://forums.sui.io/t/call-other-package-function-without-object-but-with-uid/46728 "2024-12-10T11:13:43Z")

</div>

Hi, is it possible to call package a which defines struct a and function do\_something\_with\_a(a: &A) from other package function given we know a objectid? From reading through resources I think its either not possible or …

---

## [Segmentation fault when matching enums](https://forums.sui.io/t/segmentation-fault-when-matching-enums/46665)

<div class="topic-metadata">

**Author:** [@0x0687](https://forums.sui.io/u/0x0687)\
**Replies:** 1\
**Last updated:** [December 5, 2024, 8:34pm UTC](https://forums.sui.io/t/segmentation-fault-when-matching-enums/46665 "2024-12-05T20:34:26Z")

</div>

Hi, Is anyone else getting segmentation faults when building sui code that contains match statements on an enum? Here is an example /// Module: enum\_segmentation\_fault\_demo module enum\_segmentation\_fault\_demo::enum\_se…

---

## [How can a shared object represent a Kiosk?](https://forums.sui.io/t/how-can-a-shared-object-represent-a-kiosk/46643)

<div class="topic-metadata">

**Author:** [@Stefanos](https://forums.sui.io/u/Stefanos)\
**Replies:** 1\
**Last updated:** [December 2, 2024, 3:07pm UTC](https://forums.sui.io/t/how-can-a-shared-object-represent-a-kiosk/46643 "2024-12-02T15:07:03Z")

</div>

Question from Discord: Hi Guys, I’m new to sui chain, i’m unable to understand the concept of shared Kiosk. As per the docs, the Kiosk can only be owned by one party. When I do an api to call to fetch a Kisok which …

---

## [How to convert a public key to a sui address](https://forums.sui.io/t/how-to-convert-a-public-key-to-a-sui-address/46642)

<div class="topic-metadata">

**Author:** [@Stefanos](https://forums.sui.io/u/Stefanos)\
**Replies:** 1\
**Last updated:** [December 2, 2024, 3:02pm UTC](https://forums.sui.io/t/how-to-convert-a-public-key-to-a-sui-address/46642 "2024-12-02T15:02:06Z")

</div>

Question from Discord: How to convert the public key to sui address for Sui Move.

---

## [Coming from EVM, what are some ways I can add access control to Move method calls?](https://forums.sui.io/t/coming-from-evm-what-are-some-ways-i-can-add-access-control-to-move-method-calls/46638)

<div class="topic-metadata">

**Author:** [@Stefanos](https://forums.sui.io/u/Stefanos)\
**Replies:** 1\
**Last updated:** [December 2, 2024, 2:35pm UTC](https://forums.sui.io/t/coming-from-evm-what-are-some-ways-i-can-add-access-control-to-move-method-calls/46638 "2024-12-02T14:35:04Z")

</div>

Question from Discord: another question on shared\_objects we are creating a package that interacts with a different already deployed package (x) to interact with x from our package we need to create a public shared o…

---

## [How can I use an external package type / function without having access to its repository?](https://forums.sui.io/t/how-can-i-use-an-external-package-type-function-without-having-access-to-its-repository/46227)

<div class="topic-metadata">

**Author:** [@alinachan](https://forums.sui.io/u/alinachan)\
**Replies:** 1\
**Last updated:** [December 2, 2024, 2:46pm UTC](https://forums.sui.io/t/how-can-i-use-an-external-package-type-function-without-having-access-to-its-repository/46227 "2024-12-02T14:46:56Z")

</div>

This question has come up a few times from the Sui community, so we put up a small post to explain how things work when you’re dealing with external packages on Sui without access to their Github repository. First thing…

---

## [Can I reference the package address before publishing?](https://forums.sui.io/t/can-i-reference-the-package-address-before-publishing/46640)

<div class="topic-metadata">

**Author:** [@Stefanos](https://forums.sui.io/u/Stefanos)\
**Replies:** 1\
**Last updated:** [December 2, 2024, 2:39pm UTC](https://forums.sui.io/t/can-i-reference-the-package-address-before-publishing/46640 "2024-12-02T14:39:52Z")

</div>

Question from Discord: hey does a package know its own address is there a way to refer to it inside the module this.contract\_address or something

---

## [Unexpected error when using shared Random object test scenario](https://forums.sui.io/t/unexpected-error-when-using-shared-random-object-test-scenario/46572)

<div class="topic-metadata">

**Author:** [@0x0687](https://forums.sui.io/u/0x0687)\
**Replies:** 0\
**Last updated:** [November 27, 2024, 7:58pm UTC](https://forums.sui.io/t/unexpected-error-when-using-shared-random-object-test-scenario/46572 "2024-11-27T19:58:48Z")

</div>

Hello everyone, I’m quite new around here so apologies if I am overlooking something. While writing tests for a package that is using the random module I came across some very strange behavior when using the random::Ra…

---

## [How to call function with reference argument](https://forums.sui.io/t/how-to-call-function-with-reference-argument/46370)

<div class="topic-metadata">

**Author:** [@hayk](https://forums.sui.io/u/hayk)\
**Replies:** 0\
**Last updated:** [November 11, 2024, 11:54am UTC](https://forums.sui.io/t/how-to-call-function-with-reference-argument/46370 "2024-11-11T11:54:12Z")

</div>

I have a function with a (&mut Obj) parameter. How can I call this function? I can easily call that function when the parameter is just Obj using its Id, but that way I have to delete the Object in the function.

---

## [How can I destroy / delete an option?](https://forums.sui.io/t/how-can-i-destroy-delete-an-option/46267)

<div class="topic-metadata">

**Author:** [@shakila8547](https://forums.sui.io/u/shakila8547)\
**Replies:** 1\
**Last updated:** [October 23, 2024, 8:47am UTC](https://forums.sui.io/t/how-can-i-destroy-delete-an-option/46267 "2024-10-23T08:47:04Z")

</div>

Invalid return … The local variable ‘Option’ might still contain a value. The value does not have the ‘drop’ ability and must be consumed before the function returns Move compiler failed… How can I destroy / delete an …

---

## [How to submit multi move call?](https://forums.sui.io/t/how-to-submit-multi-move-call/46188)

<div class="topic-metadata">

**Author:** [@bank1143](https://forums.sui.io/u/bank1143)\
**Replies:** 1\
**Last updated:** [October 14, 2024, 2:49pm UTC](https://forums.sui.io/t/how-to-submit-multi-move-call/46188 "2024-10-14T14:49:22Z")

</div>

how to submit multi move call like this transaction block HcZsQNduXmw6ZqNkMmp3HJVj3y6TDJypzPt5sKfjsCvx

---

## [Is there a method to get struct object](https://forums.sui.io/t/is-there-a-method-to-get-struct-object/46121)

<div class="topic-metadata">

**Author:** [@deanuko](https://forums.sui.io/u/deanuko)\
**Replies:** 2\
**Last updated:** [October 10, 2024, 1:08am UTC](https://forums.sui.io/t/is-there-a-method-to-get-struct-object/46121 "2024-10-10T01:08:46Z")

</div>

Hi. I am new to developing with sui and move. I have been going through the documentations extensively and it seems like there is no support to get an struct object instance. It seems the older documentation supported …

---

## [Can a smart contract be designed to execute its own functions automatically, similar to a cron job?](https://forums.sui.io/t/can-a-smart-contract-be-designed-to-execute-its-own-functions-automatically-similar-to-a-cron-job/46111)

<div class="topic-metadata">

**Author:** [@roylee](https://forums.sui.io/u/roylee)\
**Replies:** 2\
**Last updated:** [October 8, 2024, 4:48pm UTC](https://forums.sui.io/t/can-a-smart-contract-be-designed-to-execute-its-own-functions-automatically-similar-to-a-cron-job/46111 "2024-10-08T16:48:51Z")

</div>

Can a smart contract be designed to execute its own functions automatically, similar to a cron job? If so, what mechanisms or features within blockchain platforms support this capability, and what are the best practices…

---

## [Can I get balance coin of account (address)?](https://forums.sui.io/t/can-i-get-balance-coin-of-account-address/45972)

<div class="topic-metadata">

**Author:** [@cryptojame](https://forums.sui.io/u/cryptojame)\
**Replies:** 5\
**Last updated:** [August 13, 2024, 7:58pm UTC](https://forums.sui.io/t/can-i-get-balance-coin-of-account-address/45972 "2024-08-13T19:58:47Z")

</div>

Hello guys Can I get the token’s account (sender) balance in contract programming?

---

## [What are the token standards in Sui](https://forums.sui.io/t/what-are-the-token-standards-in-sui/45985)

<div class="topic-metadata">

**Author:** [@Nikos-T](https://forums.sui.io/u/Nikos-T)\
**Replies:** 1\
**Last updated:** [August 13, 2024, 9:32am UTC](https://forums.sui.io/t/what-are-the-token-standards-in-sui/45985 "2024-08-13T09:32:30Z")

</div>

What are the token standards in Sui, and is it possible to create ERC-20 tokens on the Sui blockchain?

---

## [How to create HTLCs](https://forums.sui.io/t/how-to-create-htlcs/45956)

<div class="topic-metadata">

**Author:** [@hayk](https://forums.sui.io/u/hayk)\
**Replies:** 0\
**Last updated:** [August 6, 2024, 3:38pm UTC](https://forums.sui.io/t/how-to-create-htlcs/45956 "2024-08-06T15:38:30Z")

</div>

Hello everyone Are there any HTLC(hash time locked contracts) implementations on SUI with move? Or anything similar to HTLCs.

---

## [How to add dependency?](https://forums.sui.io/t/how-to-add-dependency/45744)

<div class="topic-metadata">

**Author:** [@shiqicao](https://forums.sui.io/u/shiqicao)\
**Replies:** 1\
**Last updated:** [July 15, 2024, 8:50am UTC](https://forums.sui.io/t/how-to-add-dependency/45744 "2024-07-15T08:50:53Z")

</div>

How does dependency work in Move? Is a dependency staticly linked or dynamicly linked? If it is staticly linked, why does it require the referenced package to contain published-at field? How can I specify differ…

---

## [The parameter 'coin' still contains a value](https://forums.sui.io/t/the-parameter-coin-still-contains-a-value/45748)

<div class="topic-metadata">

**Author:** [@cryptojame](https://forums.sui.io/u/cryptojame)\
**Replies:** 0\
**Last updated:** [June 24, 2024, 5:26pm UTC](https://forums.sui.io/t/the-parameter-coin-still-contains-a-value/45748 "2024-06-24T17:26:23Z")

</div>

Hi all, I’m writing a func to deposit coin and use the split func to process it as code below: public fun deposit( pool: &mut Pool, coin: Coin\<SUI\>, ctx: &mut TxContext ) { let sende…

---

## [How to return object has shared?](https://forums.sui.io/t/how-to-return-object-has-shared/45686)

<div class="topic-metadata">

**Author:** [@cryptojame](https://forums.sui.io/u/cryptojame)\
**Replies:** 1\
**Last updated:** [June 10, 2024, 2:16pm UTC](https://forums.sui.io/t/how-to-return-object-has-shared/45686 "2024-06-10T14:16:06Z")

</div>

Hi all, Im write a init fun to create a shared object below: fun new\_pool( ctx: &mut TxContext ): Pool { let sender = ctx.sender(); let pool = Pool { id: object::new(ctx), user: ctx.sender(…

---

## [Relation between UID, ID and address?](https://forums.sui.io/t/relation-between-uid-id-and-address/45402)

<div class="topic-metadata">

**Author:** [@bipin\_bhandari](https://forums.sui.io/u/bipin_bhandari)\
**Replies:** 1\
**Last updated:** [May 31, 2024, 7:32pm UTC](https://forums.sui.io/t/relation-between-uid-id-and-address/45402 "2024-05-31T19:32:48Z")

</div>

I’m trying to get a clear picture of how address, ID, and UID interact. From what I gather, tx\_context::fresh\_object\_address(ctx) is used to create a new address in TxContext, which acts as a unique identifier. Then the…

---

## [Call fun with generic type](https://forums.sui.io/t/call-fun-with-generic-type/45645)

<div class="topic-metadata">

**Author:** [@cryptojame](https://forums.sui.io/u/cryptojame)\
**Replies:** 3\
**Last updated:** [May 29, 2024, 10:46am UTC](https://forums.sui.io/t/call-fun-with-generic-type/45645 "2024-05-29T10:46:52Z")

</div>

Hi, I’m new bie, im created a function with generic type so how does call this function via sui cli? code sample public entry fun new\<T\>( ctx: &mut TxContext, ) { let pool = Pool { id: …

---

## [Error while Move build ](https://forums.sui.io/t/error-while-move-build/45583)

<div class="topic-metadata">

**Author:** [@Soumalya04](https://forums.sui.io/u/Soumalya04)\
**Replies:** 0\
**Last updated:** [May 16, 2024, 7:50pm UTC](https://forums.sui.io/t/error-while-move-build/45583 "2024-05-16T19:50:21Z")

</div>

Hey how to resolve this \` Failed to build Move modules: Failed to resolve dependencies for package ‘sui\_practice1’ Caused by: 0: Fetching ‘Sui’ 1: Failed to fetch to latest Git state for package ‘Sui’, to skip set -…

---

## [RPC Error status Code:429, could not read a dependency's on-chain project](https://forums.sui.io/t/rpc-error-status-code-429-could-not-read-a-dependencys-on-chain-project/21290)

<div class="topic-metadata">

**Author:** [@Max](https://forums.sui.io/u/Max)\
**Replies:** 4\
**Last updated:** [May 16, 2024, 7:50pm UTC](https://forums.sui.io/t/rpc-error-status-code-429-could-not-read-a-dependencys-on-chain-project/21290 "2024-05-16T19:50:07Z")

</div>

Hello, Sui Experts Recently when I was trying to publish a package to sui Devnet, I got a error response from server. “Could not read a dependency’s on-chain object: RpcError(Transport(Server returned an error status c…

---

## [Accessing nested dynamic fields](https://forums.sui.io/t/accessing-nested-dynamic-fields/45559)

<div class="topic-metadata">

**Author:** [@rgundal2](https://forums.sui.io/u/rgundal2)\
**Replies:** 0\
**Last updated:** [May 12, 2024, 10:14pm UTC](https://forums.sui.io/t/accessing-nested-dynamic-fields/45559 "2024-05-12T22:14:38Z")

</div>

I currently have a shared object that contains a dynamic field which also has other dynamic fields. Am I correct in saying that the only way to view the data associated with the nested dynamic fields is by public view fu…

---

## [About the random module of sui?](https://forums.sui.io/t/about-the-random-module-of-sui/45546)

<div class="topic-metadata">

**Author:** [@3dabfl](https://forums.sui.io/u/3dabfl)\
**Replies:** 0\
**Last updated:** [May 9, 2024, 2:24pm UTC](https://forums.sui.io/t/about-the-random-module-of-sui/45546 "2024-05-09T14:24:38Z")

</div>

为什么不能使用sui::random ？对象“随机” ID是多少?为什么找不到，0x0 尚未部署吗？

---

## [Enforcing Custom Transfer Logic in Move Modules](https://forums.sui.io/t/enforcing-custom-transfer-logic-in-move-modules/45505)

<div class="topic-metadata">

**Author:** [@mshakeg](https://forums.sui.io/u/mshakeg)\
**Replies:** 1\
**Last updated:** [April 28, 2024, 9:14pm UTC](https://forums.sui.io/t/enforcing-custom-transfer-logic-in-move-modules/45505 "2024-04-28T21:14:03Z")

</div>

I’m developing a custom coin module for the Sui blockchain using the standard sui::coin How can I guarantee that all transfers of this particular coin type must utilize a specific transfer function that I’ve defined? Thi…

---

## [Macros in move 2024 beta](https://forums.sui.io/t/macros-in-move-2024-beta/45442)

<div class="topic-metadata">

**Author:** [@rgundal2](https://forums.sui.io/u/rgundal2)\
**Replies:** 1\
**Last updated:** [April 11, 2024, 2:40pm UTC](https://forums.sui.io/t/macros-in-move-2024-beta/45442 "2024-04-11T14:40:55Z")

</div>

Hello, I was just curious if macros were being used in move 2024 beta. In all of the articles I’ve seen it says macros are supported, but I’m running into compiler errors when I try to use them:

---

## [Question about the design of Receiving object](https://forums.sui.io/t/question-about-the-design-of-receiving-object/45454)

<div class="topic-metadata">

**Author:** [@howjmay](https://forums.sui.io/u/howjmay)\
**Replies:** 1\
**Last updated:** [April 11, 2024, 1:23pm UTC](https://forums.sui.io/t/question-about-the-design-of-receiving-object/45454 "2024-04-11T13:23:47Z")

</div>

I am new to SUI. I am curious about the design of Receiving. When I transfer an object, the object will turned into Receiving status, and the receiver needs to call public\_receive() explicitly. Why does SUI have this de…

---

## [What is the difference between transfer::transfer and returning something from the method](https://forums.sui.io/t/what-is-the-difference-between-transfer-transfer-and-returning-something-from-the-method/45421)

<div class="topic-metadata">

**Author:** [@finlay.b](https://forums.sui.io/u/finlay.b)\
**Replies:** 3\
**Last updated:** [April 7, 2024, 12:38pm UTC](https://forums.sui.io/t/what-is-the-difference-between-transfer-transfer-and-returning-something-from-the-method/45421 "2024-04-07T12:38:29Z")

</div>

For a lesson I am following to learn Move/SUI I have this method I need to implement /\* Withdraws the sales balance from the MinterCap object. This can only be called by the owner of the MinterCap …

[Previous page](https://forums.sui.io/c/move/17.md)

[Next page](https://forums.sui.io/c/move/17.md?page=2)
