EOS account 中的 Threshold 和 weight 使用

https://eoscity.io/f/viewtopic.php?f=7&t=17

 

这篇文章的原文:   (https://steemit.com/eos/@genereos/eos-multisig-tutorial)

What is Multisig

Multisig is a term frequently used in the cryptographic and blockchain space. Essentially it enables multiple parties to sign or approve an action that takes place - typically a requirement for certain wallets, accounts, and smart contracts to prevent a rogue or hacked individual from performing detrimental actions.

In the EOS blockchain there are a number of elements that form the overall structure of Authorities and Permissions. An outline is available on the EOS wiki directly at: https://github.com/EOSIO/eos/wiki/Accounts%20%26%20Permissions

At the most basic level you have an EOS public/private key pair, which is stored in a “wallet” so it can be used to sign transactions. The EOSIO code provides a bundled command line based wallet called keosd. In the future GUI based wallets will be developed and available.

The next level is the EOS account - a simple, human readable “name” that can be owned by an individual or a group, and is required to approve and push transactions to the network. Accounts have authorities or permissions attached, and the most simple account has a single public key tied to the “owner” authority and “active” authority. If an individual’s wallet has the corresponding private key, they can act with the respective authority of the paired public key.

Accounts can hold funds (such as EOS, or other tokens released by other parties) and publish smart contracts. The account can therefore control the movement of those funds, or revise the smart contract - this makes the authority scheme used for an account very important. 

Why is it important

If a DAC, a group of friends, or a small business decide to manage funds or operate a smart contract it may be preferable that a single person or employee would be unable to approve large sum transfers single handedly.

This is where multisig and authorities come in. A common multisig configuration is to have three individuals own an account, and require at least two of three signatories to execute an action. This is common for escrow accounts, where the sender and receiver each own one of the public keys, and an escrow arbitrator has the third in the case of a dispute. If everyone is happy, the sender and receiver sign the transaction. If there is a dispute, the escrow arbitrator can provide the private key to the winner of the dispute.

Configuration options

EOS accounts provide an exceptional level of flexibility when it comes to configuring the authority framework. Every account has two native authorities: owner and active. The owner can do “anything” and change authorities that are beneath it, such as active and custom permissions. The active authority can do anything (transfer funds, publish smart contracts, vote for block producers, etc) except change the owner.

Custom authorities can be configured that would be used by smart contracts. For example a blog smart contract might utilize a “publish” authority. Various writers could be added to the publish authority without compromising control of the smart contract and account itself.

Authorities are structured in a parent/child relationship, where the parent is capable of modifying the authorities beneath it. The “active” authority is a child of “owner”, and custom authorities may be created as children of “active” or other custom authorities.

Each authority defines a threshold and a number of public keys or other accounts and their individual weights. A standard account has a threshold of 1 and a single public key with a weight of 1 - this means that anyone with the private key can complete an action individually.

Setting a threshold of 2 and defining three accounts or public keys with a weight of 1 will result in the traditional 2 of 3 signatory multisig configuration. One could dictate “super users” that have a higher weight so they don’t require additional signatures when they act, while other users would still require additional signatures.

Because authorities can reference both public keys and accounts, the account listed in the authority structure may itself be a multisig account. It becomes clear that the account authority configuration is infinitely flexible to a group or developers specific requirements, making the EOS platform a safe and secure environment for transactions and Dapps.

Running commands

This section assumes the reader already has a basic understanding on how to use the cleos command line. A tutorial to get started using the command line is available at the official EOSIO wiki at https://github.com/EOSIO/eos/wiki/Tutorial-Comprehensive-Accounts-and-Wallets

Lets assume we have four accounts created on the network:

  • mymultisig11 - a multisig account we will configure
  • partner11111 - Bob’s personal account
  • partner22222 - Joe’s personal account
  • partner33333 - Dave’s personal account

When mymultisig11 was initially created it was configured with a single public key as both owner and active key by Bob, who is configuring the mymultisig11 prior to launching a smart contract. The team wants to configure a standard 2 of 3 multisig on both the owner and active authorities. To prevent Bob from needing everyone to participate he will change the active authority first, and the owner authority last.

mymultisig11 has a single public key for owner and active permission. mymultisig11 has a 1000 EOS balance, partner11111 has a 100 EOS balance

Bob runs the following command - he sets the threshold to 2, and gives each of the team’s accounts a weight of 1. He specifies the active permission for each individual account so that their respective owner keys aren’t required. Bob could have chosen to specify keys instead of accounts which would have used the JSON:

{"key":”<PUBLIC_KEY>”,"weight":1}

However by using accounts the account owners are given the flexibility the update their keys and authority structure without having to update the mymultisig11 authorities.

cleos set account permission mymultisig11 active '{"threshold":2,"keys":[],"accounts":[{"permission":{"actor":"partner11111","permission":"active"},"weight":1},{"permission":{"actor":"partner22222","permission":"active"},"weight":1},{"permission":{"actor":"partner33333","permission":"active"},"weight":1}],"waits":[]}' owner -p mymultisig11@owner

active permission now shows the three accounts and a threshold of 2

Now the the active permissions have been set, Bob goes ahead and changes the ownership permission. Once the ownership authority has changed to a multisig format Bob will require his team to participate whenever they need to change any additional authorities in the future.

Notice that the “owner” parent is dropped from the end of this command (just before the -p). Thats because that parameter specifies the parent of the authority being configured - owner has no parent, and so it is left blank.

cleos set account permission mymultisig11 owner '{"threshold":2,"keys":[],"accounts":[{"permission":{"actor":"partner11111","permission":"owner"},"weight":1},{"permission":{"actor":"partner22222","permission":"owner"},"weight":1},{"permission":{"actor":"partner33333","permission":"owner"},"weight":1}],"waits":[]}' -p mymultisig11@owner

owner permission has been similarly updated

Now that the mymultisig11 account has been successfully configured Bob would like to test the multisig functionality by paying himself for his efforts. To do this Bob uses the eosio.msig system contract to propose a transaction. The other team members may review and approve or unapprove the transaction.

Bob runs this command to propose the payment. The first array is the permissions the proposal requires, while the second array dictates which permission is used to actually execute the transaction. To “unlock” the mymultisig11@active permission he requires the approval of two of three of the accounts specified. 

Because Bob doesn’t want to sign his own transaction, he requests Joe and Dave to sign it. Bob could have listed himself, and approved one of the signatures himself, but he felt that would be rude.

cleos multisig propose payme '[{"actor": "partner22222", "permission": "active"},{"actor": "partner33333", "permission": "active"}]' '[{"actor": "mymultisig11", "permission": "active"}]' eosio.token transfer '{"from":"mymultisig11", "to":"partner11111", "quantity":"25.0000 SYS", "memo":"Pay partner11111 some money"}' -p partner11111@active

Now the proposal has been listed Joe and Dave can review it by running the following command. This command returns JSON that shows the transaction that will be executed if they approve it.

cleos multisig review partner11111 payme -p partner22222@active

Reviewing the JSON of the proposal shows the transaction and authority being requested. Pay careful attention to only approve acceptable transactions!

Satisfied with the hard work Bob has done today Joe and Dave both approve the transaction from their own terminals using their own unlocked wallets.

cleos multisig approve partner11111 payme '{"actor": "partner22222", "permission": "active"}' -p partner22222@active
cleos multisig approve partner11111 payme '{"actor": "partner33333", "permission": "active"}' -p partner33333@active

Now that the multisig transaction is approved Bob can execute it.

cleos multisig exec partner11111 payme -p partner11111@active

In the real world Joe and Dave would approve on their “own computers”. Now that the transaction has been executed we see that 25 EOS has moved from mymultisig11 to partner11111 successfully.

Conclusion

Multisig accounts will be a critical safety feature for all users of the EOS ecosystem. While future development will lead to GUI wallets that simplify and streamline the process it is important for Dapp developers and enthusiasts to experiment and fully understand the multisig process as early as possible. 

Decentralised applications and charitable, transparent endeavours such as those GenerEOS is developing will rely heavily upon multisig security, and we hope this article helps ensure the EOS implementation of multisig is as safe and successful as possible.

Check out Nathan's overview video on this topic: Youtube:  https://youtu.be/Bi3Oals39l8

About Us

GenerEOS is a social enterprise block producing candidate with a mission of promoting and supporting scalable and highly reliable block production whilst giving back block rewards to charities.

Based out of Sydney, Australia, GenerEOS is founded by a team of like minded blockchain enthusiasts with diverse backgrounds and a passion to make a difference in the world and fostering the spirit of generosity by giving back.

Public Presence


Website: https://www.genereos-sydney.io
Steem: https://steemit.com/@genereos
Reddit: https://www.reddit.com/user/GenerEOS
Github: https://github.com/generEOS
Medium: https://medium.com/@generEOS
Facebook: https://www.facebook.com/generEOS

 

 

 

### 參考
### https://github.com/EOSIO/eos/tree/maste ... eosio.msig
### https://steemit.com/eos/@genereos/eos-multisig-tutorial
### By CKC

### 這一篇主要說明的在 EOS 中的帳號中, Weight /Threshold 使用說明.
### 權重(weight)中的數值代表著被授權(authority)中的比重,
### 閾值(Threshold)代表者此一授權至少需要多少的權重和 ( wegith sum) 才能被授權.
### 比如說, 我們可以開一個銀行帳號,此一帳號需要多人以上簽名聯署才能動用帳號內金額.
### 或是分級授權的應用,
### 比如金額在五萬元以下支出, 可以用部門主管簽名即可, 而大於一百萬的支出, 需由部門主管和總經理同意才能支出.
### 這些排列組合非常適合商業活動中,分層授權以及多人簽名的運用.


### 底下的三個帳戶是練習中會用到, 並且預先建立及把私鑰匯入到 wallet 中.
account: eosmultisig1
Public key EOS65jhd25qMLuiSHSqjhgQUd3Hugi8bT6SHrFT9Yew27TpkuMFjS
Private key 5JcKhoCYMYDKuxLEPnZNzp1XsnRkrpUxJStF55zu8Mu4wrFbMrQ
Public key EOS5BKXGDByMkcwZb7fHxZUm7i9KAY6RZdU9TgvxN9qL4Uy6X4hyP
Private key 5KfBQmWd7aWAQqUjfWbomYGwL9wEfXFRct1ZgHaPi97tbGpWVdM

account: eosioalice22
Public key EOS6sdU6tTfvJ3jkwV8NFTMPHJK5EK94zz7kWQUqHr9FLYmJD1wSv
Private key 5Ka7xeRDvHpQ3B49JA9g2fdf7g39C1veLzDrbb2pK6RZYtBXTGm

account: eosiobobbob1
Public key EOS8CPZmDMzwtf3qWs8hQx8LXbppFM1zMLHuMpgjx8twbRTaBRx6k
Private key 5KhxBvZejkvCNZJBujvVathtmFtveiD131sefiNRD5rURYzHKRm

代碼: 選擇全部

$ ./cleos.sh wallet keys
[
  "EOS5BKXGDByMkcwZb7fHxZUm7i9KAY6RZdU9TgvxN9qL4Uy6X4hyP",
  "EOS5MM1wJP3cz3dkDKPXoiHzBMCwauDkcnRTjjkzFZEd9snMYDei2",
  "EOS65jhd25qMLuiSHSqjhgQUd3Hugi8bT6SHrFT9Yew27TpkuMFjS",
  "EOS6sdU6tTfvJ3jkwV8NFTMPHJK5EK94zz7kWQUqHr9FLYmJD1wSv",
  "EOS7snfWw7eNSUWnSHBPxn5WXLZewoQj1pZC3BdAdnPpQnaVEnNhu",
  "EOS8CPZmDMzwtf3qWs8hQx8LXbppFM1zMLHuMpgjx8twbRTaBRx6k"
]

代碼: 選擇全部

$ ./cleos.sh get account eosmultisig1
permissions: 
     owner     1:    1 EOS65jhd25qMLuiSHSqjhgQUd3Hugi8bT6SHrFT9Yew27TpkuMFjS
        active     1:    1 EOS5BKXGDByMkcwZb7fHxZUm7i9KAY6RZdU9TgvxN9qL4Uy6X4hyP
memory: 
     quota:     5.346 KiB    used:     3.365 KiB  

net bandwidth: 
     staked:        100.0000 EOS           (total stake delegated from account to self)
     delegated:       0.0000 EOS           (total staked delegated to account from others)
     used:                 0 bytes
     available:        18.28 MiB  
     limit:            18.28 MiB  

cpu bandwidth:
     staked:        100.0000 EOS           (total stake delegated from account to self)
     delegated:       0.0000 EOS           (total staked delegated to account from others)
     used:                 0 us   
     available:        3.649 sec  
     limit:            3.649 sec  

producers:     <not voted>

### 底下的第一個練習是把 "eosmultisig1" 的 active 權限(permission) 進行修改, 把其用 eosiobobbob1 active 來替換.
### Threshold 和 Weight 這裡都是設成 1, 也就是只要有 eosiobobbob1 的 acitve 權限, 就可以代為執行 eosmultisig1 的 active 動作.

代碼: 選擇全部

$ ./cleos.sh set account permission eosmultisig1 active '{"threshold":1,"keys":[],"accounts":[{"permission":{"actor":"eosiobobbob1","permission":"active"},"weight":1}]}'  -p eosmultisig1@owner
executed transaction: c0cc1debcc0bcac4e11ef54940d03e4dfbc05f6a06599061b242bff15218c20c  144 bytes  2203 us
#         eosio <= eosio::updateauth            {"account":"eosmultisig1","permission":"active","parent":"owner","auth":{"threshold":1,"keys":[],"ac...
warning: transaction executed locally, but may not be confirmed by the network yet    ]

代碼: 選擇全部

$ ./cleos.sh get account eosmultisig1
permissions: 
     owner     1:    1 EOS65jhd25qMLuiSHSqjhgQUd3Hugi8bT6SHrFT9Yew27TpkuMFjS
        active     1:    1 eosiobobbob1@active, 
memory: 
     quota:     5.346 KiB    used:     3.348 KiB  

net bandwidth: 
     staked:        100.0000 EOS           (total stake delegated from account to self)
     delegated:       0.0000 EOS           (total staked delegated to account from others)
     used:               145 bytes
     available:        18.28 MiB  
     limit:            18.28 MiB  

cpu bandwidth:
     staked:        100.0000 EOS           (total stake delegated from account to self)
     delegated:       0.0000 EOS           (total staked delegated to account from others)
     used:             1.177 ms   
     available:        3.648 sec  
     limit:            3.649 sec  

producers:     <not voted>

### 把 "eosmultisig1" 的 active 權限(permission) 進行修改, 把其用 eosiobobbob1 active 以及由擁用
### "EOS6sdU6tTfvJ3jkwV8NFTMPHJK5EK94zz7kWQUqHr9FLYmJD1wSv" 權限者
### 在此一例子, 目前是 eosioalice22 所用的key.

代碼: 選擇全部

$ ./cleos.sh set account permission eosmultisig1 active '{"threshold":2,"keys":[{"key":"EOS6sdU6tTfvJ3jkwV8NFTMPHJK5EK94zz7kWQUqHr9FLYmJD1wSv","weight":1}],"accounts":[{"permission":{"actor":"eosiobobbob1","permission":"active"},"weight":1}]}'  -p eosmultisig1@owner
executed transaction: df1b5ca4bfe9ff7bb411f33451b3731fe5d9c86996d94fde8b10e8db1031944c  184 bytes  2200 us
#         eosio <= eosio::updateauth            {"account":"eosmultisig1","permission":"active","parent":"owner","auth":{"threshold":2,"keys":[{"key...
warning: transaction executed locally, but may not be confirmed by the network yet    ] 

代碼: 選擇全部

$ ./cleos.sh get account eosmultisig1
permissions: 
     owner     1:    1 EOS65jhd25qMLuiSHSqjhgQUd3Hugi8bT6SHrFT9Yew27TpkuMFjS
        active     2:    1 EOS6sdU6tTfvJ3jkwV8NFTMPHJK5EK94zz7kWQUqHr9FLYmJD1wSv1 eosiobobbob1@active, 
memory: 
     quota:     5.346 KiB    used:     3.396 KiB  

net bandwidth: 
     staked:        100.0000 EOS           (total stake delegated from account to self)
     delegated:       0.0000 EOS           (total staked delegated to account from others)
     used:               472 bytes
     available:        18.28 MiB  
     limit:            18.28 MiB  

cpu bandwidth:
     staked:        100.0000 EOS           (total stake delegated from account to self)
     delegated:       0.0000 EOS           (total staked delegated to account from others)
     used:             2.888 ms   
     available:        3.646 sec  
     limit:            3.649 sec  

producers:     <not voted>

### 可以把帳號中更詳細的資料, 輸出為 JSON 格式.

代碼: 選擇全部

$ ./cleos.sh get account eosmultisig1 -j
{
  "account_name": "eosmultisig1",
  "head_block_num": 15875904,
  "head_block_time": "2018-09-23T16:40:19.500",
  "privileged": false,
  "last_code_update": "1970-01-01T00:00:00.000",
  "created": "2018-09-23T12:50:30.000",
  "ram_quota": 5474,
  "net_weight": 1000000,
  "cpu_weight": 1000000,
  "net_limit": {
    "used": 472,
    "available": 19167636,
    "max": 19168108
  },
  "cpu_limit": {
    "used": 2888,
    "available": 3646005,
    "max": 3648893
  },
  "ram_usage": 3478,
  "permissions": [{
      "perm_name": "active",
      "parent": "owner",
      "required_auth": {
        "threshold": 2,
        "keys": [{
            "key": "EOS6sdU6tTfvJ3jkwV8NFTMPHJK5EK94zz7kWQUqHr9FLYmJD1wSv",
            "weight": 1
          }
        ],
        "accounts": [{
            "permission": {
              "actor": "eosiobobbob1",
              "permission": "active"
            },
            "weight": 1
          }
        ],
        "waits": []
      }
    },{
	  "perm_name": "owner",
      "parent": "",
      "required_auth": {
        "threshold": 1,
        "keys": [{
            "key": "EOS65jhd25qMLuiSHSqjhgQUd3Hugi8bT6SHrFT9Yew27TpkuMFjS",
            "weight": 1
          }
        ],
        "accounts": [],
        "waits": []
      }
    }
  ],
  "total_resources": {
    "owner": "eosmultisig1",
    "net_weight": "100.0000 EOS",
    "cpu_weight": "100.0000 EOS",
    "ram_bytes": 4074
  },
  "self_delegated_bandwidth": {
    "from": "eosmultisig1",
    "to": "eosmultisig1",
    "net_weight": "100.0000 EOS",
    "cpu_weight": "100.0000 EOS"
  },
  "refund_request": null,
  "voter_info": {
    "owner": "eosmultisig1",
    "proxy": "",
    "producers": [],
    "staked": 2000000,
    "last_vote_weight": "0.00000000000000000",
    "proxied_vote_weight": "0.00000000000000000",
    "is_proxy": 0
  }
}

### Threshold 設為 2, 另外 "eosioalice22" 和 "eosiobobbob1" 的權重(weigh) 設定為 1
### 也就是只要有 eosioalice22 和 eosiobobbob1 的 owner 權限同二者都同意, 就可以代為執行 eosmultisig1 所授權的 active 相關動作, 比如轉帳.
### 這例子就好比如公司在銀行中開了一個二人共同簽名帳戶, 需要二人都同意簽名後, 才能做戶頭帳款的使用,
### 如果只有其中一人授權的話, 無法動用帳戶存款.
### 這就是這個的例子, Threshold 設定為 2, 而每個 weights 只設為 1.

代碼: 選擇全部

$ ./cleos.sh set account permission eosmultisig1 active '{"threshold":2,"keys":[],"accounts":[{"permission":{"actor":"eosioalice22","permission":"owner"},"weight":1},{"permission":{"actor":"eosiobobbob1","permission":"owner"},"weight":1}],"waits":[]}' owner -p eosmultisig1@owner
executed transaction: 32100d1bb22d2a0488be390842aaefec2257c91bd91b58bafdb430bd0a12d9ee  160 bytes  2189 us
#         eosio <= eosio::updateauth            {"account":"eosmultisig1","permission":"active","parent":"owner","auth":{"threshold":1,"keys":[],"ac...
warning: transaction executed locally, but may not be confirmed by the network yet    ] 

代碼: 選擇全部

$ ./cleos.sh get account eosmultisig1 
permissions: 
     owner     1:    1 EOS65jhd25qMLuiSHSqjhgQUd3Hugi8bT6SHrFT9Yew27TpkuMFjS
        active     2:    1 eosioalice22@owner, 1 eosiobobbob1@owner, 
memory: 
     quota:     5.346 KiB    used:     3.379 KiB  

net bandwidth: 
     staked:        100.0000 EOS           (total stake delegated from account to self)
     delegated:       0.0000 EOS           (total staked delegated to account from others)
     used:               956 bytes
     available:        18.28 MiB  
     limit:            18.28 MiB  

cpu bandwidth:
     staked:        100.0000 EOS           (total stake delegated from account to self)
     delegated:       0.0000 EOS           (total staked delegated to account from others)
     used:              4.21 ms   
     available:        3.645 sec  
     limit:            3.649 sec  

producers:     <not voted>

### 注意, 底下的範例會出現錯誤, 主要的差別是 Actor 需要照排序順序來填入, 如果沒有照著順序的話, 就會出現錯誤.

代碼: 選擇全部

$ ./cleos.sh set account permission eosmultisig1 active '{"threshold":1,"keys":[],"accounts":[{"permission":{"actor":"eosiobobbob1","permission":"owner"},"weight":1},{"permission":{"actor":"eosioalice22","permission":"owner"},"weight":1}],"waits":[]}' owner -p eosmultisig1@owner
Error 3010004: Invalid authority
Ensure that your authority JSON is valid follows the following format!
{
  "threshold":      <INTEGER [1-2^32): the threshold that must be met to satisfy this authority>,
  "keys": [         <keys must be alpha-numerically sorted by their string representations and unique>
    ...
    {
      "key":        <STRING: EOS.IO compatible Public Key>,
      "weight":     <INTEGER [1-2^16): a signature from this key contributes this to satisfying the threshold>
    }
    ...
  ],
  "accounts": [     <accounts must be alpha-numerically sorted by their permission (actor, then permission) and unique>
    ...
    {
      "permission": {
        "actor":      <STRING: account name of the delegated signer>,
        "permission": <STRING: permission level on the account that must be satisfied>,
      },
      "weight":     <INTEGER [1-2^16): satisfying the delegation contributes this to satisfying the threshold>
    }
    ...
  ],
  "waits": [        <waits must be sorted by wait_sec, largest first, and be unique>
    ...
    {
      "wait_sec":   <INTEGER [1-2^32): seconds of delay which qualifies as passing this wait>
      "weight":     <INTEGER [1-2^16): satisfying the delay contributes this to satisfying the threshold>
    }
    ...
  ]
}

Error Details:
Authority failed validation! ensure that keys, accounts, and waits are sorted and that the threshold is valid and satisfiable!

### 發動一筆轉帳動作,這裡設定需要二人( eosioalice22,eosiobobbob1) 都同意才能被核可

代碼: 選擇全部

$ ./cleos.sh multisig propose paytesting '[{"actor": "eosioalice22", "permission": "owner"},{"actor": "eosiobobbob1", "permission": "owner"}]' '[{"actor": "eosmultisig1", "permission": "active"}]' eosio.token transfer '{"from":"eosmultisig1", "to":"eosioalice22", "quantity":"25.0000 EOS", "memo":"Pay eosioalice22 some money"}' -p eosioalice22@owner
executed transaction: 31a8866c5b344ec573ba0734f4c0efe2c5d5393ae48569334e43cf5e074a08cf  256 bytes  2066 us
#    eosio.msig <= eosio.msig::propose          {"proposer":"eosioalice22","proposal_name":"paytesting","requested":[{"actor":"eosioalice22","permis...
warning: transaction executed locally, but may not be confirmed by the network yet    ] 

### 查看一下 paytesting 的 multisig 內容

代碼: 選擇全部

$ ./cleos.sh multisig review eosioalice22 paytesting
{
  "proposal_name": "paytesting",
  "packed_transaction": "15e2a95b000000000000000000000100a6823403ea3055000000572d3ccdcd011098c32e472d315500000000a8ed32323c1098c32e472d31552084422e1aea305590d003000000000004535953000000001b50617920656f73696f616c696365323220736f6d65206d6f6e657900",
  "transaction": {
    "expiration": "2018-09-25T07:21:57",
    "ref_block_num": 0,
    "ref_block_prefix": 0,
    "max_net_usage_words": 0,
    "max_cpu_usage_ms": 0,
    "delay_sec": 0,
    "context_free_actions": [],
    "actions": [{
        "account": "eosio.token",
        "name": "transfer",
        "authorization": [{
            "actor": "eosmultisig1",
            "permission": "active"
          }
        ],
        "data": {
          "from": "eosmultisig1",
          "to": "eosioalice22",
          "quantity": "25.0000 SYS",
          "memo": "Pay eosioalice22 some money"
        },
        "hex_data": "1098c32e472d31552084422e1aea305590d003000000000004535953000000001b50617920656f73696f616c696365323220736f6d65206d6f6e6579"
      }
    ],
    "transaction_extensions": []
  }
}
### eosiobobbob1 核可 paytesting 動作

代碼: 選擇全部

$ ./cleos.sh multisig approve eosioalice22 paytesting '{"actor": "eosiobobbob1", "permission": "owner"}' -p eosiobobbob1@owner
executed transaction: 14c165a402465ba9f28ec3dda82847828cb0c237328219071a3b09283bdae8a6  128 bytes  1448 us
#    eosio.msig <= eosio.msig::approve          {"proposer":"eosioalice22","proposal_name":"paytesting","level":{"actor":"eosiobobbob1","permission"...
warning: transaction executed locally, but may not be confirmed by the network yet    ] 
### eosioalice22 核可 paytesting 動作

代碼: 選擇全部

$ ./cleos.sh multisig approve eosioalice22 paytesting '{"actor": "eosioalice22", "permission": "owner"}' -p eosioalice22@owner
executed transaction: 1f4180c34da2cbbc83c98776b5a6e9e64d75ae0d900258f2cab45733f2f59464  128 bytes  1318 us
#    eosio.msig <= eosio.msig::approve          {"proposer":"eosioalice22","proposal_name":"paytesting","level":{"actor":"eosioalice22","permission"...
warning: transaction executed locally, but may not be confirmed by the network yet    ] 
### 執行 paytesting

代碼: 選擇全部

$ ./cleos.sh multisig exec eosioalice22 paytesting -p eosioalice22@owner
executed transaction: 6d797c6eeafab231cc5baf2859e11341f4379d1fb25d97786fbaacb8280774b4  160 bytes  2106 us
#    eosio.msig <= eosio.msig::exec             {"proposer":"eosioalice22","proposal_name":"paytesting","executer":"eosioalice22"}
warning: transaction executed locally, but may not be confirmed by the network yet    ] 

 

posted @ 2018-10-10 09:30  微信公众号--共鸣圈  阅读(998)  评论(0编辑  收藏  举报