Buy quant random

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

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

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

The amount (random_price) for the transfer can be seen in the contract config (example via cleos).

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": ""
}

Last updated