Migrated from my FIO.WIKI
All examples will use the localhost as the default URL.
The first step of any msig proposal is generating a transaction. In this example, we will show how to generate a transaction to propose a single fee change and how to add multiple transactions into a single proposal.
Creating a single transaction without submitting to the chain:
./clio -u http://localhost:8889 push action -f fio.fee createfee '{"end_point":"auth_delete","type":"0","suf_amount":"400000000"}' --permission fio.fee@active -s -j -d > tx.json
Once you have the single tx.json, you’ll need to modify the file and configure the correct “expiration” date. Once a proper date has been set, you can submit a proposal. From this point, you can also add multiple transactions into a single msig proposal by duplicating the following step:
Create another transaction:
./clio -u http://localhost:8889 push action -f fio.fee createfee '{"end_point":"transfer_fio_domain","type":"0","suf_amount":"99800000000"}' --permission fio.fee@active -s -j -d > tx2.json
Take the tx2.json and under the “actions” section, copy the body starting at the {. Example:
{
“account”: “fio.fee”,
“name”: “createfee”,
“authorization”: [{
“actor”: “fio.fee”,
“permission”: “active”
}
],
“data”: “137472616e736665725f66696f5f646f6d61696e000000000000000000268b3c17000000”
}
Now that you have the body of the transaction copied onto the clipboard, open the master tx.json file and add to the previous transaction actions array. Example:
{
“account”: “fio.fee”,
“name”: “createfee”,
“authorization”: [{
“actor”: “fio.fee”,
“permission”: “active”
}
],
“data”: “0b617574685f64656c65746500000000000000000084d71700000000”
},{
“account”: “fio.fee”,
“name”: “createfee”,
“authorization”: [{
“actor”: “fio.fee”,
“permission”: “active”
}
],
“data”: “137472616e736665725f66696f5f646f6d61696e000000000000000000268b3c17000000”
}
Repeat this step until you are finished with your proposal.
Generating the Proposal:
Verifying the top 30 BPs:
./clio -u http://localhost:8889 system listproducers -j -l 30 | jq -r '.producers[]
Obtaining Producers Permissions ( Top 30 needed for msig approval ):
./clio -u http://localhost:8889 system listproducers -j -l 30 | jq -r '.producers[] | ( "{\"actor\": \"" + .owner + "\", \"permission\": \"active\"}" )'
Example Output:
{“actor”: “qbxn5zhw2ypw”, “permission”: “active”}
{“actor”: “hfdg2qumuvlc”, “permission”: “active”}
{“actor”: “wttywsmdmfew”, “permission”: “active”}
Proposing a msig for the setting of fees manually:
./clio -u http://localhost:8889 multisig propose_trx newfee1 "{"actor":"qbxn5zhw2ypw", "permission": "active"},{"actor": "hfdg2qumuvlc", "permission": "active"},{"actor": "wttywsmdmfew", "permission": "active"}" tx.json myaccount 1000000000 -p myaccount
Verifying proposal and viewing approvals:
./clio -u http://localhost:8889 get table eosio.msig myaccount newfee1 | jq '.rows[0].provided_approvals | length'
Execute MSIG:
./clio -u http://localhost:8889 multisig exec myaccount newfee1 400000000 -p myaccount