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更新链上合约 #867

Open
klren0312 opened this issue Nov 14, 2024 · 0 comments
Open

sui更新链上合约 #867

klren0312 opened this issue Nov 14, 2024 · 0 comments
Labels
Blockchain 区块链相关问题

Comments

@klren0312
Copy link
Owner

klren0312 commented Nov 14, 2024

发布合约后,可以看到一个 0x2::package::UpgradeCap

image

在更新合约时,使用这个objectid,即可更新合约,后续更新还是用这个第一次的UpgradeCap

sui client upgrade --upgrade-capability 0x0201cdae80356d7fa8424eefb3b621349afa3bcfe65807f11db24fe2740c6baf

可以看到,这里version变成了2
image

然后接着使用新的packageid即可
image

注意:后面的版本 init 方法可能会被忽略,不会再执行.

@klren0312 klren0312 added the Blockchain 区块链相关问题 label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blockchain 区块链相关问题
Projects
None yet
Development

No branches or pull requests

1 participant