Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sui limitations #335

Open
6 tasks
leina05 opened this issue Dec 9, 2022 · 7 comments
Open
6 tasks

sui limitations #335

leina05 opened this issue Dec 9, 2022 · 7 comments

Comments

@leina05
Copy link
Collaborator

leina05 commented Dec 9, 2022

Tracking issue for limitations we've run into with Sui.

@lidatong
Copy link
Collaborator

another limitation that is quite annoying is there is no getAccountResource. you have to know the object_id to query it, but we only know the type beforehand

@lidatong lidatong pinned this issue Dec 11, 2022
@leina05
Copy link
Collaborator Author

leina05 commented Dec 12, 2022

another limitation that is quite annoying is there is no getAccountResource. you have to know the object_id to query it, but we only know the type beforehand

What about https://docs.sui.io/sui-jsonrpc#sui_getObjectsOwnedByAddress?

EDIT: doesn't work for shared objects?

@lidatong
Copy link
Collaborator

lidatong commented Dec 12, 2022

another limitation that is quite annoying is there is no getAccountResource. you have to know the object_id to query it, but we only know the type beforehand

What about https://docs.sui.io/sui-jsonrpc#sui_getObjectsOwnedByAddress?

EDIT: doesn't work for shared objects?

this is the issue i was referencing (i edited your initial comment) MystenLabs/sui#3782

@lidatong
Copy link
Collaborator

another limitation that is quite annoying is there is no getAccountResource. you have to know the object_id to query it, but we only know the type beforehand

What about https://docs.sui.io/sui-jsonrpc#sui_getObjectsOwnedByAddress?

EDIT: doesn't work for shared objects?

get objects by address is still a bit unfriendly (forgetting the owned limitation) because you have to traverse all the objects and compare against the type (and conditionally deserialize)

@fardream
Copy link
Collaborator

For this MystenLabs/sui#6693

Does it require user to pass in the CoinMetaData object?

@fardream
Copy link
Collaborator

  • UX of managing coins? if i want to swap 5 SUI, who splits out that 5 SUI? should the contract take &mut Coin, amount: u64? should the dapp require 2 user approvals: 1. to split the coin, 2. to do the actual tx? some other way?
    sdk tx batches

Second option is impossible since split is not entry function as of now:

https://github.com/MystenLabs/sui/blob/62f41674637250933c68f35293bfc6e0cf48d8ec/crates/sui-framework/sources/coin.move#L180-L186

@fardream
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants