Deploy Protocols on L2
This guide explains how to deploy and configure the bridge and signal service protocols on L2.
- 1. Configure Bridge
- 2. Configure Signal Service
Bridge Configuration
Prerequisites
- L1 Chain ID (3151908)
- L1_BRIDGE:
0x72bCbB3f339aF622c28a26488Eed9097a2977404
- L2_SHARED_ADDRESS_MANAGER:
0x7633740000000000000000000000000000000006
- L2 Prefunded Account private key
- L2 RPC URL
Set Environment Variables
export FOUNDRY_PROFILE=layer1
export DOMAIN=3151908
export ADDRESS=0x72bCbB3f339aF622c28a26488Eed9097a2977404
export NAME=0x6272696467650000000000000000000000000000000000000000000000000000
export PROXY_ADDRESS=0x7633740000000000000000000000000000000006
export PRIVATE_KEY=0xbcdf20249abf0ed6d944c0288fad489e33f66b3960d9e6229c1cd214ed3bbe31
export L2_RPC_URL=https://placeholder:8547
Bridge Setup Script
docker run \
-e FOUNDRY_PROFILE=${FOUNDRY_PROFILE} \
-e DOMAIN=${DOMAIN} \
-e ADDRESS=${ADDRESS} \
-e NAME=${NAME} \
-e PROXY_ADDRESS=${PROXY_ADDRESS} \
-e PRIVATE_KEY=${PRIVATE_KEY} \
nethsurge/taiko-contract:surge-devnet \
forge script ./script/shared/SetAddress.s.sol \
--private-key ${PRIVATE_KEY} \
--fork-url ${L2_RPC_URL} \
--broadcast -vvv
Signal Service Configuration
Prerequisites
- L1 Chain ID (3151908)
- L1_SIGNAL_SERVICE:
0x00c042C4D5D913277CE16611a2ce6e9003554aD5
- L2_SHARED_ADDRESS_MANAGER:
0x7633740000000000000000000000000000000006
- L2 Prefunded Account private key
- L2 RPC URL
Set Environment Variables
export FOUNDRY_PROFILE=layer1
export DOMAIN=3151908
export ADDRESS=0x00c042C4D5D913277CE16611a2ce6e9003554aD5
export NAME=0x7369676e616c5f73657276696365000000000000000000000000000000000000
export PROXY_ADDRESS=0x7633740000000000000000000000000000000006
export PRIVATE_KEY=0xbcdf20249abf0ed6d944c0288fad489e33f66b3960d9e6229c1cd214ed3bbe31
export L2_RPC_URL=https://placeholder:8547
Signal Service Setup Script
docker run \
-e FOUNDRY_PROFILE=${FOUNDRY_PROFILE} \
-e DOMAIN=${DOMAIN} \
-e ADDRESS=${ADDRESS} \
-e NAME=${NAME} \
-e PROXY_ADDRESS=${PROXY_ADDRESS} \
-e PRIVATE_KEY=${PRIVATE_KEY} \
nethsurge/taiko-contract:surge-devnet \
forge script ./script/shared/SetAddress.s.sol \
--private-key ${PRIVATE_KEY} \
--fork-url ${L2_RPC_URL} \
--broadcast -vvv
Verification Steps
After deploying both protocols:
- Verify Bridge Setup
- Confirm the bridge address is correctly set
- Check transaction confirmation on L2
- Verify the bridge contract is accessible
- Verify Signal Service Setup
- Confirm the signal service address is correctly set
- Check transaction confirmation on L2
- Verify the signal service contract is accessible
Important Note
Ensure you have sufficient funds in your L2 account before deploying these protocols, as each transaction will require gas fees.
Troubleshooting
If you encounter issues during deployment:
- Check Connectivity
- Verify L2 RPC endpoint is accessible
- Ensure network connectivity is stable
- Account Issues
- Confirm account has sufficient funds
- Verify private key is correct
- Check account permissions
- Contract Interactions
- Verify contract addresses are correct
- Check that ABI matches the deployed contracts
- Ensure gas limits are sufficient