Skip to main content
The Fireblocks JSON-RPC is a command-line server that utilizes the Fireblocks API to facilitate interactions with Ethereum Virtual Machine (EVM) chains. It enables users to perform blockchain operations through a JSON-RPC interface, and it was developed to simplify the integration of Fireblocks’ secure wallet infrastructure with blockchain applications. In this article, you will find installation instructions, code examples, and guidance on how to utilize Fireblocks JSON RPC and other frameworks (e.g. Brownie, Foundry) for smart contract development and interactions.

Getting Started

web3.py integration

Fireblocks JSON-RPC helps seamlessly integrate Fireblocks into your web3.py development stack. You can use it to deploy contracts, sign messages, and send transactions.

Installation

Setup

Set the environment variables. Create example.py:

Usage

You can now use the web3 object exactly as you normally would!

Ethereum Smart Contract Development

Using Brownie

Use the Fireblocks JSON-RPC to seamlessly work with Brownie on top of Fireblocks.

Installation

Step 1 - Brownie installation:

Please follow the Brownie official documentation for installation

Step 2 - Install Fireblocks JSON RPC server:

Setup

Step 1 - Create a new example Brownie project:

Step 2 - set environment variables:

Set the environment variables

Step 3 - Add Fireblocks Sepolia network to Brownie:

Step 4 - Configure brownie-config.yaml file:

Add dotenv: .env parameter to the config yaml file. Example:

Usage:

Using Foundry

Installing Foundry

You can skip this section if you already have Foundry installed or follow that Foundry Installation guide , Foundry New Project guide on the Foundry website for all details. We provide you with a very basic process here for convenience:
After you complete these steps, you’ll have a new Foundry project.

Foundry integration

The Fireblocks Local JSON-RPC helps seamlessly integrate Fireblocks into your Foundry development stack. You can use it to deploy contracts, sign messages, and send transactions.

Installation

Configuration

Configuration can be set via command line flags or environment variables. Command line flags:
  • Ignore apiBaseUrl if you are not using a sandbox environment
Environment variables:
  • Ignore FIREBLOCKS_API_BASE_URL if you are not using a sandbox environment
Delete the files that came with your Foundry boilerplate template:

Deploy Contract - Using ‘forge script’

Now that you have a Foundry project set up, create your smart contract src/Hello.sol in the project folder and then deploy it to the Sepolia Ethereum Testnet.

Step 1: Create and compile the Solidity file

Run the following command to compile it:

Step 2: Create the deployment script

Create a deployment script script/Hello.s.sol :

Step 3: Deploy smart contract

Deploy your contract to the Ethereum Sepolia Testnet (It is recommended to use the --slow parameter in your forge script command, specifically when the script is processing few transactions sequentially):
  • sender_address can be found in your Fireblocks workspace, through Fireblocks API, or using the JSON RPC directly. Get address of vault account 0:
This should take a couple of minutes to run if everything was configured correctly.