You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend the 0x2::transfer::transfer system method and sui::pay module to support transferring assets to objects. Specifically, allow the to address to be an object ID or address in addition to an account address.
Rationale
Currently, to transfer assets to an object, users need to send assets via dynamic fields through a function call defined by the module of the object type. This method is technically sufficient but creates friction for user experience. For example, it reduces on-chain composability for object-based treasury management applications such as multi-sig, smart contract wallets, and DAO management tools with treasury.
By extending the 0x2::transfer::transfer system method and sui::pay module to support transferring assets to objects directly, users can transfer assets without needing to know and call customized deposit functions. This will improve the user experience and increase on-chain composability for object-based treasury management applications.
Proposed Solution
To implement this feature, the following changes should be made:
Extend the 0x2::transfer::transfer system method to allow the to address to be an object ID or address in addition to an account address. When the to address is an object, the move should call dynamic_object_field::add to add the asset to the object.
In the sui::pay module, extend the join_vec_and_transfer and split_and_transfer methods to allow the receiver parameter to be an object ID or address in addition to an account address. When the receiver is an object, move should transfer the coins to the object following the standard of coin management for move account.
(Optional) Add an acceptTransfer flag to the Object structure. The acceptTransfer flag is a boolean value indicating whether the object accepts assets sent via transfer. Transferring assets to an object whose acceptTransfer flag is false will abort with an error code. The acceptTransfer flag can be set by the move language, similar to transfer::share_object.
By implementing these changes, users will be able to transfer assets to objects directly, improving the user experience and increasing on-chain composability for object-based treasury management applications. The optional acceptTransfer flag will provide an additional layer of security by allowing objects to explicitly indicate whether they accept asset transfers or not.
The text was updated successfully, but these errors were encountered:
Feature Description
Extend the 0x2::transfer::transfer system method and sui::pay module to support transferring assets to objects. Specifically, allow the to address to be an object ID or address in addition to an account address.
Rationale
Currently, to transfer assets to an object, users need to send assets via dynamic fields through a function call defined by the module of the object type. This method is technically sufficient but creates friction for user experience. For example, it reduces on-chain composability for object-based treasury management applications such as multi-sig, smart contract wallets, and DAO management tools with treasury.
By extending the 0x2::transfer::transfer system method and sui::pay module to support transferring assets to objects directly, users can transfer assets without needing to know and call customized deposit functions. This will improve the user experience and increase on-chain composability for object-based treasury management applications.
Proposed Solution
To implement this feature, the following changes should be made:
Extend the 0x2::transfer::transfer system method to allow the to address to be an object ID or address in addition to an account address. When the to address is an object, the move should call dynamic_object_field::add to add the asset to the object.
In the sui::pay module, extend the join_vec_and_transfer and split_and_transfer methods to allow the receiver parameter to be an object ID or address in addition to an account address. When the receiver is an object, move should transfer the coins to the object following the standard of coin management for move account.
(Optional) Add an
acceptTransfer
flag to the Object structure. TheacceptTransfer
flag is a boolean value indicating whether the object accepts assets sent via transfer. Transferring assets to an object whoseacceptTransfer
flag is false will abort with an error code. TheacceptTransfer
flag can be set by the move language, similar totransfer::share_object
.By implementing these changes, users will be able to transfer assets to objects directly, improving the user experience and increasing on-chain composability for object-based treasury management applications. The optional acceptTransfer flag will provide an additional layer of security by allowing objects to explicitly indicate whether they accept asset transfers or not.
The text was updated successfully, but these errors were encountered: