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

TS-SDK does not support automatic address management (deploy/upgrade) #20466

Open
web3olalala opened this issue Nov 28, 2024 · 6 comments
Open
Assignees
Labels

Comments

@web3olalala
Copy link

Currently Sui binary supports automatic address management, but TS-SDK doesn't support it .

@stefan-mysten
Copy link
Contributor

Thanks @web3olalala for this request. Passed it on to the right folks!

@web3olalala
Copy link
Author

@stefan-mysten @hayes-mysten Is there a timeline for adding this part of the functionality, as we are developing a tool that will need to use this functionality🙏

@hayes-mysten
Copy link
Contributor

This isn't something on our roadmap. Can you elaborate on what you are hoping for with this change? The SDK runs in a lot of different environments, and there isn't a consistent way to securely store keys across those environments

@web3olalala
Copy link
Author

@hayes-mysten https://docs.sui.io/concepts/sui-move-concepts/packages/automated-address-management
The relevant content is here.

Example:
I have deployed PackageA.
Now I need to deploy PackageB, which is dependent on PackageA.
PackageB's Toml:

[package]
name = "packageB"
version = "0.0.1"
edition = "2024.beta"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.36.2" }
PackageA = { local = "/Volumes/project/packageA" }

[addresses]
sui = "0x2"
packageB = "0x0"

Sui binary is able to deploy PackageB successfully because it will do address management automatically, but it is not able to deploy successfully with TS-SDK.

@hayes-mysten
Copy link
Contributor

I don't think its likely anything like this will be added to the sui SDK. As I said before, the sdk is designed to run in a lot of environments, and isn't really meant for fully automated flows like the publish commands in the cli. This would require understanding of toml/lock files and file system access. This doesn't really fit well with the rest of the tools in the sdk.

I think the best way to handle this would be to build a separate typescript SDK around publishing if you wanted this kind of publish flow with side-effects on the filesystem

@hayes-mysten
Copy link
Contributor

I am also not sure how possible this is without the ability to re-compiling the move code, which the sdk currently doesn't know anything about.

You can probably get away with just replacing addresses manually in the byte-code, but this is definitely not something we will be building into the core sdk anytime soon

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

No branches or pull requests

3 participants