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. Createexample.py:
Usage
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 installationStep 2 - Install Fireblocks JSON RPC server:
Setup
Step 1 - Create a new example Brownie project:
Step 2 - set environment variables:
Set the environment variablesStep 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: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
- Ignore FIREBLOCKS_API_BASE_URL if you are not using a sandbox environment
Deploy Contract - Using ‘forge script’
Now that you have a Foundry project set up, create your smart contractsrc/Hello.sol in the project folder and then deploy it to the Sepolia Ethereum Testnet.
Step 1: Create and compile the Solidity file
Step 2: Create the deployment script
Create a deployment scriptscript/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_addresscan be found in your Fireblocks workspace, through Fireblocks API, or using the JSON RPC directly. Get address of vault account 0: