🔴

Optimism Integration

Complete guide for integrating Optimism networks into your Bicrypto Ecosystem

📖 Overview

This guide shows you how to integrate Optimism networks (Optimism Mainnet and Goerli) into your Bicrypto Ecosystem. You'll add Optimism credentials in .env, acquire API/RPC endpoints (preferably from Alchemy), then set up wallets and tokens in the admin panel—similar to how it's done for Ethereum or other EVM-compatible chains.

Supported Networks

Optimism Mainnet and Goerli Testnet are supported. ETH (Layer 2) is used for transaction fees on Optimism.

1️⃣ Configure Environment Variables

Optimism Environment Variables

Add the following Optimism-specific variables to your .env file:

# Optimism Networks (mainnet, goerli)
OPTIMISM_EXPLORER_API_KEY="YOUR_OPTIMISM_EXPLORER_API_KEY"  # e.g., M2QE9SE3WSUB...
OPTIMISM_NETWORK="goerli"
OPTIMISM_MAINNET_RPC="https://YOUR_MAINNET_RPC_PLACEHOLDER"
OPTIMISM_MAINNET_RPC_WSS=""
OPTIMISM_GOERLI_RPC="https://YOUR_GOERLI_RPC_PLACEHOLDER"
OPTIMISM_GOERLI_RPC_WSS=""

OPTIMISM_EXPLORER_API_KEY: Your Optimistic Etherscan API key for blockchain data

OPTIMISM_NETWORK: Active network (mainnet or goerli)

RPC/WSS URLs: HTTP and WebSocket endpoints for each network

2️⃣ Acquire API Keys and RPC Endpoints

OE

Optimistic Etherscan

Create an account at Optimistic Etherscan and generate an API key for blockchain data access.

OPTIMISM_EXPLORER_API_KEY="your_key_here"
AL

Alchemy (Recommended)

Sign up at Alchemy for reliable Optimism RPC endpoints with excellent support for Layer 2 networks.

OPTIMISM_MAINNET_RPC="https://your-endpoint"
Optimistic Etherscan API key creation

3️⃣ Apply Environment Updates

4️⃣ Configure Master Wallet

5️⃣ Enable Tokens and Configure Fees

6️⃣ Custodial Wallets (For Non-Permit Tokens)

When Custodial Wallets Are Needed

Some tokens don't support the PERMIT feature for fee delegation. For these tokens, you'll need to deploy custodial wallets.

1

Fund Master Wallet

Ensure your master wallet has sufficient ETH (Layer 2) to cover gas fees for custodial wallet deployments and transactions.

2

Deploy Custodial Wallet

Go to Admin → Extensions → Ecosystem → Custodial Wallets and deploy a new custodial wallet for Optimism.

The platform will handle user deposits/withdrawals through this wallet, with the master wallet paying ETH gas fees.

🔍 Optimism-Specific Considerations

Lower Gas Fees

Optimism gas fees are generally lower than Ethereum L1, but can still vary. Monitor fees and adjust your minimum withdrawal fees accordingly.

Goerli Testnet

Use Goerli testnet for development. Set OPTIMISM_NETWORK="goerli" and acquire test ETH from Goerli faucets.

🔒 Security Best Practices