Proposal - shiwk/AElf GitHub Wiki

准备工作

多个密钥

  • 授权公钥A

     {"Pubkey":"04b1037d072b03a426e4621ca0e9842a59dfb5c3288cc48134e1006535f7b3dcb4a663ee3714aba1908cb5b182285107fdd7fdf5333c0d4d9e1983c49f30912e32"}
    
  • 授权公钥B

     {"Pubkey":"04c5654507a01be21db37b13cd528a64334cb7e44b964141c089c9cfd49e23fa50f6ac42fb0e0496a83b70c0e6c41e35849356c65ad1a63145e521ed970ab46ae6"}
    

Tips

默认已配置如下环境

AELF_CLI_DATADIR
AELF_CLI_ENDPOINT
AELF_CLI_ACCOUNT

创建多签账户

  • CMD

    create-multi-sig <executing_threshold> <proposer_threshold> <authinfo>

    <executing_threshold> 用生成的多签账户触发执行提案的权限threshold(同意该提案的公钥的权限总和的下限)

    <proposer_threshold> 发起提案提案权限(发起提案人的公钥的权限下限)

    <authinfo> 至少1个授权公钥(如授权公钥A, 授权公钥B),并附带权限(weight)

  • 交易结果

    <msig_address>

  • Demo

    create-multi-sig 2 0 [{"PubKey":"04b1037d072b03a426e4621ca0e9842a59dfb5c3288cc48134e1006535f7b3dcb4a663ee3714aba1908cb5b182285107fdd7fdf5333c0d4d9e1983c49f30912e32","Weight":"1"},{"PubKey":"04c5654507a01be21db37b13cd528a64334cb7e44b964141c089c9cfd49e23fa50f6ac42fb0e0496a83b70c0e6c41e35849356c65ad1a63145e521ed970ab46ae6","Weight":"1"}]

发起提案

  • CMD

    create-proposal <name> <msig_address> <time> <target_address> <method_name> <params>

    <name> 提案名称(自定义)

    <msig_address> 多签账户地址

    <time> 超时时间(秒)

    <target_address> target contract address which packed_txn is for

    <method_name> invoked method in target contract

    <params> parameters for invoked method in target contract

  • 交易结果

    <proposal_id>

  • Demo

     create-proposal InitializeToken ELF_4a5F84J6Q6STtdqaSG9f7AEQq7kEgSqGSpv3J6aoHQXLxUQ 3600 ELF_4Qna4KWEr9XyxewGNHku1gwUvqtfsARSHcwjd3WXBpLw9Yx Initialize ["aelf","AElf","100000","1"]
    

查看提案

  • CMD

    check-proposal <proposal_id>

  • Demo

    check-proposal e49a32f74695ecb81ec1f504ac5506cb462fbb19159fe01c46c33df1c8282e93

通过提案

  • CMD

    approve-proposal <proposal_id>

  • Demo

    approve-proposal e49a32f74695ecb81ec1f504ac5506cb462fbb19159fe01c46c33df1c8282e93

执行提案

  • CMD

    release-proposal <proposal_id>

  • Demo

    release-proposal e49a32f74695ecb81ec1f504ac5506cb462fbb19159fe01c46c33df1c8282e93

⚠️ **GitHub.com Fallback** ⚠️