# 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="/files/fBNY6UfJLb4fXFHECToL" 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": ""
}
```


---

# 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://sp8de-docs.gitbook.io/s-p-8-d-e-or-white-paper/smart-contract-user-funct./buy-quant-random.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.
