SimpleVRF

CLI

SimpleVRF CLI

A command-line interface for interacting with the SimpleVRF contract on Fuel.

Installation

bun install

Configuration

Before using the CLI, set up your configuration:

# Set node type (mainnet/testnet)
bun start config node mainnet
 
# Set contract address
bun start config contract <contract_address>
 
# Set wallet private key
bun start config wallet <private_key>
 
# Show current configuration
bun start config show

Available Commands

Configuration Commands

  • bun start config show – Show current configuration
  • bun start config node <node_type> – Set network node (testnet/mainnet)
  • bun start config contract <contract_address> – Set contract address
  • bun start config wallet <private_key> – Set wallet private key

Fee Commands

  • bun start fee get <asset_id> – Get fee for an asset
  • bun start fee set <asset_id> <amount> – Set fee for an asset

Request Commands

  • bun start request count – Get total number of requests
  • bun start request num <request_number> – Get request by number
  • bun start request seed <request_seed> – Get request by seed

Authority Commands

  • bun start authorities get – List all authorities
  • bun start authorities set <authority_address> – Add a new authority
  • bun start authorities remove <authority_address> – Remove an authority

Withdraw Commands

  • bun start withdraw <asset_id> <amount> – Withdraw fees (supports ETH or any asset ID)

Examples

Setting up for Mainnet

bun start config node mainnet
bun start config contract 0x27df32291e3507935c7ac8bc10c965ccca6a6e3c8ac510f0c9ca8546feefca9e
bun start config wallet <your_private_key>
bun start config show

Managing Fees

bun start fee set <asset_id> 100
bun start fee get <asset_id>

Managing Requests

bun start request count
bun start request num 1
bun start request seed <seed>

Managing Authorities

bun start authorities set <authority_address>
bun start authorities get
bun start authorities remove <authority_address>

Withdrawing Funds

bun start withdraw ETH 100
bun start withdraw <asset_id> <amount>

Notes

  • The ETH asset ID is automatically handled when using "ETH" as the asset identifier
  • All amounts should be provided in the smallest unit (wei for ETH)
  • Make sure to keep your private key secure and never share it

On this page