【问题标题】:What is forking a smart contract actually mean? How to fork Sushiswap's Sushibar smart conract and implement staking features?分叉智能合约实际上意味着什么?如何分叉 Sushiswap 的 Sushibar 智能合约并实现 Staking 功能?
【发布时间】:2022-08-02 14:07:05
【问题描述】:

我了解什么是智能合约分叉的理论,但在实践中,我如何实现分叉?实际意义是分叉,将新的 Staking 智能合约部署为工厂,并导入 Sushibar、Sushimaker、ERC20 和其他有用的智能合约,并将它们部署在 deploy.ts 中,因为新版本的 Sushiswap 在 typescript 中。我关注了来自 EatTheBlocks 的 this 视频。谁能解释一下如何实际分叉智能合约或向我推荐一些我能理解的好内容?

    标签: fork blockchain smartcontracts


    【解决方案1】:

    您可以使用 timelock 在特定日期分叉寿司吧合约并在其中实施质押功能

    contract timelock{
    uint public constant duration = 30 
    days;
    uint public immutable_end;
    address payable public 
    immutable_owner;
    

    并参考eattheblock时间锁合约了解更多详情

    【讨论】:

      猜你喜欢
      • 2021-12-28
      • 1970-01-01
      • 1970-01-01
      • 2022-01-09
      • 2017-11-07
      • 2023-01-25
      • 2022-12-06
      • 2018-09-23
      • 2023-02-09
      相关资源
      最近更新 更多