# How To Transfer Tokens To A Worker

### Goal

Create a multi-signature transaction for transferring funds from *gls.worker* account to a worker to pay for finished work. The transaction should be approved by Golos active leaders.

### Before you begin

* Install the currently supported version of `cleos`.
* Understand the following:
  * Who is a worker.
  * Who is a Golos application leader.
  * What is a [multisig propose transaction](https://docs.cyberway.io/software_manuals/command_reference/multisig#multisig-propose-transaction).

*Worker* - a user directly performing work in accordance with the statement of work. User’s account can be an individual or a group of people.

## Steps

**Step 1** Retrive a list of active leaders with the appropriate authority to create (as well as to sign) proposal transaction to pay a worker his work.

*Variant 1*\
Retrive the list of active leaders using *JS*.\
Go to `explorer.cyberway.io/account/gls.worker`.

![](/files/-M9SQP-k5GHc_IGwqbW8)

In `Permissions` section open the field of active Golos leaders with `gls@witn.smajor` account rights.

![](/files/-M9SQP-lRl6Bs_tGz-Un)

In the field `active`, account `gls.worker` has an authorization from `gls@active` - that is a list of active leaders. Copy the list of active leaders from `witn.smajor` to separate place.

![List to keep](/files/-M9SQP-mvLBhX-sfvf2p)

Signatures of these leaders will be necessary to sign proposal transaction.

*Variant 2*\
Retrive the list of active leaders using *cleos* command line.

Get *gls.worker* authority:

```bash
$ cleos -u http://seed-1:8888 get account gls.worker
```

*Output*

```bash
created: 2019-08-15T14:00:00.00
permissions:
     owner     1:    1 gls@owner
        active     1:    1 gls@active`
memory:
     quota:         0 bytes  used:        0 bytes
```

Get leaders authority:

```bash
$ cleos -u http://seed-1:8888 get account gls
```

*Output*

![](/files/-M9SQP-nVYL3MQe91Cw7)

**Step 2** Create proposal transaction.\
To prevent the transaction from becoming `expired` while signatures are being collected, you have to set the transaction expiretime, for example, *14* days that is *1209600* in seconds (*60×60×24×14=1209600*). The maximum allowable time is *45* days.

For convenience, you can get and use the list of supported options.

```bash
$ cleos push action --help
```

*Output*

![](/files/-M9SQP-oL71wtxoIuwf2)

The most important options are `-x`, `-s` and `-d`.\
The command line looks like:

```bash
$ cleos –u http://seed-1:8888 push action –d –s –x 1209600 cyber.token transfer '{"from":"gls.worker", "to":"shwojevqcywn", "quantity":"1000.000 GOLOS", "memo":""}' –p gls.worker –bandwidth-provider gls.worker/gls
```

*Output*

![](/files/-M8xqrLjzVf_PDY3xU2K)

Copy the transaction output code to a separate file (i.e. `worker.trx`).

**Step 3** Form a list of signatories.\
Retrive a list of active leaders who have right to sign a transaction. This list can be retrieved from the *gls* account authorization:

```bash
$ cleos –u http://seed-1:8888 get account –j gls
```

From the result output, select and save the list of actors that will look like:

![Actors accounts](/files/-M8xqrLkgzHFmBEkzF1g)

Convert list of actors to string form like this one `[{"account", "permission"}, ... ,{"account", "permission"}]`.

*Example*

```bash
[{"actor": "lavnch3wug2o","permission: "active"},{"actor": "2cv2urmf2pud","permission: "active"}, ... ,{"actor": "rtvmqvzi5lvt","permission: "active"}]
```

**Step 4** Submit the proposal.\
\&#xNAN;*Variant 1*\
Submit the proposal using *JS*.\
Go to `explorer.cyberway.io/account/cyber.msig/contract`, open the propose tab and fill the fields in.

![Fields to fill](/files/-M8xqrLlks6F1hdyjL3L)

* `proposer` – an author of proposal, any user can be (`shwojevqcywn` - in our case).
* `proposal_name` – proposal name (`worker.trans` - in our case).
* `requested` – kept string of signatories \[{...}].
* `trx` – kept transaction code that is {...}.
* `description` – some comment.

Enter the proposer name in the authorization field.\
Click `build transaction`.

*Variant 2*\
Submit the proposal using *cleos* command line:

```bash
cleos -u http://seed-1:8888 multisig propose_trx worker.trans permissions.json worker.trx shwojevqcywn -p shwojevqcywn
```

* `permissions.json` - the file containing permisions list in JSON form.
* `worker.trx` - the file containing transaction.

**Step 5** Sign the transaction with your private key and send a link to the transaction to Golos leaders.\
\&#xNAN;*Variant 1*\
Sign the transaction using *JS*.

![](/files/-M8xqrLmCrS5sbRcosjN)

*Variant 2*\
Sign the transaction using *cleos* command line.

```bash
cleos -u http://seed-1:8888 multisig approve shwojevqcywn worker.trans '{"actor":"shwojevqcywn", "permission":"active"}' -p shwojevqcywn
```

**Step 6** Review the proposal.\
\&#xNAN;*Variant 1*\
Review the proposal using *JS*.\
Go to `https://explorer.cyberway.io/account/shwojevqcywn/proposals`.\
The list of proposals sent by the proposer account will appear, indicating block number and transaction (worker.trans). Leaders can sign the transaction using this link.

![](/files/-M8xqrLnyVJGD-ztMrTn)

Click name `worker.trans` to get actual information about voting process.

![](/files/-M8xqrLoMPs_o9X52aLg)

*Variant 2*\
Review the proposal using *cleos* command line:

```bash
$ cleos -u http://seed-1:8888 multisig review shwojevqcywn worker.trans
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cyberway.io/software_manuals/how_to_guides/transfer_tokens_to_worker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
