> For the complete documentation index, see [llms.txt](https://docs.arpanetwork.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arpanetwork.io/randcast/getting-started/use-web-gui/remix.md).

# Remix

### Deploy Consumer Contract Example

1. Open [`Remix`](https://remix.ethereum.org/) and clone the following repo: <https://github.com/ARPA-Network/Randcast-User-Contract>

<img src="/files/k9rpcj0HAe320esPg6zb" alt="" data-size="original">

2. Open one of the examples (We will use the roll dice example here):  `contracts/user/examples/RollDiceExample.sol`&#x20;
3. Click `Compile`.
4. Click `Deploy & run transactions` on the left sidebar, connect wallet and select `Injected Provider` as environment. You'll see the connected account if it's all set up.

![](/files/9hDWHHjBctwe8zq83N6Y)

5. Pass in the [`Adapter` address](/randcast/supported-networks-and-parameters.md), click `Deploy`, and approve the transaction in your wallet (Metamask). Note: Next time you open [`Remix`](https://remix.ethereum.org/), you can enable the deployed contract by compiling, passing the contract address then clicking `At Address`.
6. After the contract deployment has completed,  you will see the `ROLLDICEEXAMPLE` in the below `Deployed Contracts` section.&#x20;
7. Copy the address of deployed consumer contract and bind it to your subscription via the subscription portal.

<figure><img src="/files/PcPUhvy9DTbkhHZW3rza" alt=""><figcaption></figcaption></figure>

### Request Randomness to Roll Dice

1. Make sure you have created an active subscription with enough funds and the consumer contract has been added to the subscription. (see [Subscription Management Portal - Consumers](/randcast/getting-started/use-web-gui/subscription-management-portal.md#consumers))
2. Click `ROLLDICEEXAMPLE` to expand the available functions.

![](/files/4O94v315a3AmoIkxRsEv)

3. Specify "bunch" (the number of dice you want to roll) and then click `rollDice.`

***Note**: A `Gas estimation failed` notification will pop up when the ETH balance in your wallet is too low to send the transaction, or if the consumer contract is not bound to any subscription.*

![](/files/57pR4mTImqbSe6XOdmTz)

4. Call `lengthOfDiceResults()` to see whether the output is the same as the `bunch` value you passed. Call `diceResults` with the index up to the `bunch` to check the output of each dice cast.

Congratulations on successfully requesting randomness from Randcast! Randcast provides a set of tools to help you write your custom consumer contract and manage your subscription. Please continue reading to learn more.
