This directory contains the Solidity code for Reddio's L1 and L2 bridge contracts implemented using the Diamond Proxy pattern (EIP-2535). The Diamond standard allows for modular and upgradeable smart contracts by separating functionality into multiple facets. Diamond Proxy Pattern (EIP-2535) The Diamond Proxy pattern enables:
Modular design: Functionality is split into independent facets
Upgradeability: Individual facets can be upgraded without affecting others
Size management: Avoids Ethereum contract size limitations
Clear separation: Storage, logic, and interfaces are separated
Learn more about EIP-2535(https://eips.ethereum.org/EIPS/eip-2535)
├── Diamond.sol - Main diamond proxy contract ├── access - Access control contracts (Ownable, Roles, etc.) ├── childLayer - L2 bridge contracts (Reddio L2) ├── common - Shared utilities and libraries ├── interfaces - Core contract interfaces ├── libraries - Reusable libraries and utilities ├── parentLayer - L1 bridge contracts (Ethereum) ├── storage - Diamond storage layout definitions ├── tokens - Token contracts (ERC20, ERC721, etc.) └── utils - Utility contracts and helpers
git clone https://github.com/reddio-com/reddio_bridge_contract.gitcd evm-bridge
npm install.sepolia.env
export HARDHAT_ENV=sepolia
export DIAMOND_ADDRESS=...
export RPC_PROVIDER=...
export ADMIN_PRIVATE_KEY=...
export ETHERSCAN_KEY=....localhost.env
export HARDHAT_ENV=localhost
export DIAMOND_ADDRESS=...
export RPC_PROVIDER=...
export ADMIN_PRIVATE_KEY=...
export ETHERSCAN_KEY=...deploy parentLayer on sepolia
npm run deployParentLayer:sepoliadeploy childLayer on localhost
npm run deployChildLayer:localhostrun parentLayer client on sepolia
npm run parentClient:sepoliarun childLayer client on localhost
npm run childClient:localhostThis project is licensed under the Apache-2.0 License.