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:
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.
Clone the SecretPath Repository
Navigate to the Public Gateway Directory
Initialize Submodules
You'll deploy the gateway contract using Foundry's forge
tool.
Replace <YOUR_PRIVATE_KEY>
with your actual private key. Keep your private key secure and do not share it.
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:
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.
config.yml
for EditingReplace <YOUR_GATEWAY_ADDRESS>
with the Gateway Address obtained from the deployment step.
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.
Download and install Anaconda for your operating system:
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.
LRU
ErrorIf you encounter an error related to lru-dict
, update it using: