> For the complete documentation index, see [llms.txt](https://sp8de-docs.gitbook.io/s-p-8-d-e-or-white-paper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sp8de-docs.gitbook.io/s-p-8-d-e-or-white-paper/smart-contract-user-funct./buy-quant-random.md).

# Buy quant random

To buy randoms, you must authorize the system account to sign a joint transaction to receive the result&#x20;

```bash
cleos -u <address node> set account permission <user account> active quant.random --add-code
```

To purchase random it is necessary to perform a transaction with the transfer of QRNG tokens to the random contract

```bash
cleos -u <address node> push action quant.token transfer '["<sender>", "quant.random", "amount QRNG with config", "<account name for result forward>"]' -p <sender>
```

<figure><img src="https://3112201423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvE1qTxK5RQkiRxrDR1jq%2Fuploads%2FzW907jLMbMwjrOWA8TmW%2Fimage.png?alt=media&amp;token=f3105126-0d83-4eed-bd11-9fad65379b66" alt=""><figcaption></figcaption></figure>

The amount (*random\_price*) for the transfer can be seen in the contract config (example via `cleos`).&#x20;

```bash
cleos -u <address node> get table quant.random quant.random config

{
  "rows": [{
      "random_price": "50 QRNG",
      "token_contract": "quant.token",
      "is_requare_sign": 0,
      "trust_account": "creator"
    }
  ],
  "more": false,
  "next_key": "",
  "next_key_bytes": ""
}
```
