1. Configuring JSONRPC

Configuring JSONRPC in Environment Variables.

Get a RPC of Arbitrum One

Infura as an example.

  1. Get a apikey form infura.

  2. Active the Arbitrum Mainnet

Configuring Environment Variables

For Linux/macOS

  1. Open the configuration file:

nano ~/.bashrc

(For Zsh, use ~/.zshrc instead.)

  1. Add the following line:

export JSONRPC_URL=https://your-rpc-endpoint.example.com
  1. Save the file and apply changes:

source ~/.bashrc
  1. Verify:

echo $JSONRPC_URL

For Windows

Using the System Settings:

1. Open Environment Variables:

• Press Win + R, type sysdm.cpl, and hit Enter.

• Go to the Advanced tab and click on Environment Variables.

2. Add a New Variable:

• Under User variables or System variables, click New.

• Enter JSONRPC_URL as the name and {your_rpc} as the value.

• Click OK to save.

3. Verify:

• Open a new Command Prompt and run:

echo %JSONRPC_URL%

Using Command Prompt:

setx JSONRPC_URL https://your-rpc-endpoint.example.com

Verify:

• Close and reopen Command Prompt.

• Run:

echo %JSONRPC_URL%

Using PowerShell:

[System.Environment]::SetEnvironmentVariable("JSONRPC_URL", "https://your-rpc-endpoint.example.com", "User")

Verify:

• Close and reopen PowerShell.

• Run:

$env:JSONRPC_URL

For Docker

See here.

Last updated