Skip to content

Worker proposal functionalities in cli_wallet

Wiesław Kędzierski edited this page Apr 9, 2019 · 23 revisions

This wiki will present way of using new cli_wallet functions for worker proposal purpose.

0. Introduction.

A worker proposal system allows Steem users to publicly propose work that they are willing to do in exchange for pay. More info about Worker proposal is on https://steemit.com/blocktrades/@blocktrades/proposing-a-worker-proposal-system-for-steem

1. Cli wallet proposal function description.

To handle worker proposal, there have been added two new functionalities in cli_wallet :

  • create_proposal - create new proposal,
  • update_proposal_votes - update already existing worker proposals,
  • list_proposals - display all proposals,
  • list_voter_proposals - display all voters proposals,
  • find_proposals - display info about wanted proposal,
  • remove_proposal - remove given proposal.

Both functions will be available in interactive mode.

2. Cli wallet proposal function usage.

Below shall be described usage examples of new functions.

2.1 Usage example of create_proposal.

Syntax is as follows :

  • create_proposal creator receiver start_date end_date daily_pay subject url broadcast

where :

  • create_proposal - function call name,
  • creator - account that create the proposal,
  • receiver - account that will be funded,
  • start_date - start date of proposal,
  • end_date - end date of proposal,
  • daily_pay - the amount of SBD that is being requested to be paid out daily,
  • subject - briefly description of proposal of its title,
  • permlink - valid permalink to existing page with description of proposal ,
  • broadcast - should transaction be broadcasted or not.

Usage example :

create_proposal "blocktrades" "treasury" "2019-03-01T00:00:00" "2019-04-01T00:00:00" "1500.000 SBD" "this is subject" "mypermalink" true

create_proposal "blocktrades" "blocktrades" "2019-03-01T00:00:00" "2019-04-01T00:00:00" "1600.000 SBD" "hello" "mypermalink2" true

create_proposal "blocktrades" "null" "2019-03-01T00:00:00" "2019-04-01T00:00:00" "1700.000 SBD" "hello" "mypermalink3" true

create_proposal "blocktrades" "ann17" "2019-03-01T00:00:00" "2019-04-01T00:00:00" "1800.000 SBD" "hello" "mypermalink4" true

2.2 Usage example of update_proposal_votes.

Syntax is as follows :

  • update_proposal_votes voter [set of worker_proposal_id] approve broadcast

where:

  • update_proposal_votes - function call name,
  • voter - voting account,
  • [set of worker_proposal_id] - array with proposal ids,
  • approve - set if proposals should be approved or not [true or false],
  • broadcast - should transaction be broadcasted or not.

Usage example :

update_proposal_votes "jack789" [3,67,44,1] true true

update_proposal_votes "jack789" [1] false true

2.3 Usage example of list_proposals

Syntax is as follows :

  • list_proposals start order_by order_type limit status last_id

where:

  • start - starting value for querying results,
  • order_by - select field by which list shall be sorted [ "creator", "start_date", "end_date", "total_votes"],
  • order_type - sorting order ["asc" - ascending, "desc" - descending],
  • limit - query limit,
  • status - select proposal to list ["active", "inactive", "expired", "all", "votable"],
  • last_id - id of the proposal to start listing, helpful when one need to paginate results k where k > limit (id or empty string).

Note: votable status is a status describing proposal that can be voted so (inactive or active)

Usage example :

list_proposals "" "creator" "asc" 10 "all" ""

list_proposals "2019-03-01T00:00:00" "start_date" "desc" 10 "inactive" ""

list_proposals "2019-03-01T00:00:00" "end_date" "desc" 10 "active" ""

list_proposals 10 "total_votes" "asc" 10 "all" ""

2.4 Usage example of list_voter_proposals

Syntax is as follows :

  • list_voter_proposals start order_by order_type limit status last_id

where:

  • start - starting value for a query,
  • order_by - select field by which list shall be sorted [[ "creator", "start_date", "end_date", "total_votes"],
  • order_type - sorting order ["asc" - ascending, "desc" - descending],
  • limit - query limit,
  • status - select proposal to list ["active", "inactive", "all", "votable"],
  • last_id - id of the proposal to start listing, helpful when one need to paginate results k where k > limit (id or empty string).

Note: votable status is a status describing proposal that can be voted so (inactive or active)

Usage example :

list_voter_proposals "initminer" "creator" "asc" 10 "active" ""

list_voter_proposals "2019-03-01T00:00:00" "start_date" "desc" 10 "inactive" 5

list_voter_proposals "2019-03-01T00:00:00" "end_date" "desc" 10 "inactive" ""

list_voter_proposals 10 "total_votes" "asc" 10 "all" ""

2.5 Usage example of find_proposal

Syntax is as follows :

  • find_proposals ids

where:

  • ids - array with ids of wanted proposals to be founded.

Usage example :

find_proposals [1]

find_proposals [1,2,3,4]

2.6 Usage example of remove_proposal

Syntax is as follows :

  • remove_proposal deleter [ids] broadcast

where:

  • deleter - account authorized to delete given proposal,
  • ids - array with ids of proposal to be deleted,
  • broadcast - should transaction be broadcasted or not.

Usage example :

remove_proposal "initminer" [14,25,15] true

2.7 Common requirements.

All arguments in for all described commands are required. If there will be not enough arguments wallet will display error message and no action will be performed.

You can’t perform that action at this time.