How to deploy SecretPath on your chain
Secretpath in itself is a trustless protocol, meaning that everyone can deploy a public gateway on their own chain. Here's how to do it:
Prerequisites
Before you begin, make sure you have the following installed on your system:
Git: Version control system for cloning repositories.
Foundry: A blazing fast, portable, and modular toolkit for Ethereum application development.
Anaconda: For creating a virtual environment (Python 3.11).
Python 3.11 & : Required for running the relayer scripts. Python package installer.
Access to the Sepolia Testnet: You'll need to interact with the edeXa Testnet.
Cloning the Repository and Initial Setup
Clone the SecretPath Repository
Navigate to the Public Gateway Directory
Initialize Submodules
Deploying the Gateway Contract
You'll deploy the gateway contract using Foundry's forge
tool.
Run the Forge Script
Replace <YOUR_PRIVATE_KEY>
with your actual private key. Keep your private key secure and do not share it.
Handling Gas Price Error
If you encounter the following error:
You need to adjust the gas price.
a. Estimate the Correct Gas Price
Visit the Ethereum Sepolia Testnet explorer to check recent gas prices:
b. Add the Gas Price Flag
Re-run the forge script with the --with-gas-price
flag:
Understanding the Deployment Output
Upon successful deployment, you will see two contract addresses:
Implementation Address: The first address, representing the implementation contract.
Gateway Address: The second address, which is the Transparent Upgradeable Proxy contract.
Note: The Gateway Admin is your wallet address (you are the owner of the contracts). The Proxy Admin is specified in the logs of the Gateway Address contract deployment. The Proxy Admin contract is exclusively used for upgrading contracts, and the Gateway Admin is the owner of this Proxy Admin contract.
Configuring the Relayer
Navigate to the Relayer Directory
Open config.yml
for Editing
config.yml
for EditingAdd the Following Configuration
Replace <YOUR_GATEWAY_ADDRESS>
with the Gateway Address obtained from the deployment step.
Add Environment Variables
Create a .env
file or set the following environment variables. Replace the placeholders with your actual private keys. Keep your private keys secure and do not share them.
Setting Up the Virtual Environment
Install Anaconda
Download and install Anaconda for your operating system:
Create a Virtual Environment
Activate the Virtual Environment
Install Dependencies
Navigate to the relayer directory if you're not already there:
Install the required Python packages, make sure to not install depencencies as this may lead to dependency hell.
Running the Relayer
Start the Relayer
Handling the LRU
Error
LRU
ErrorIf you encounter an error related to lru-dict
, update it using:
Last updated