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

智能合约部署上线之后还可以修改吗?我的 DApp 要升级怎么办? #5

Open
cssmagic opened this issue Jun 14, 2018 · 0 comments
Labels

Comments

@cssmagic
Copy link
Member

cssmagic commented Jun 14, 2018

能否修改

智能合约一旦部署上线,就无法修改。所以部署之前请全面测试。

DApp 如何升级

目前可行的做法:

  • 启用新合约:
    1. 把老合约里的数据导出
    2. 再导入到新合约
    3. 客户端启用新合约

将来可行的做法:

  • 合约调合约(据说在开发中)
    • 把合约中 “负责业务逻辑的部分” 和 “负责存储数据的部分” 拆成两个合约,单独部署
    • 单独升级负责业务逻辑的合约
  • 合约共享数据(官方文档显示将来应该会有)
    • 直接启用新合约即可
@cssmagic cssmagic added the FAQ label Jun 14, 2018
@cssmagic cssmagic changed the title 智能合约部署上线之后还可以修改吗?我的 DApp 升级怎么办? 智能合约部署上线之后还可以修改吗?我的 DApp 要升级怎么办? Jun 16, 2018
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

1 participant