Skip to content

Commit

Permalink
chore: update contract docs, ascii art (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
airtoonricardo authored Nov 7, 2024
1 parent 3e068d8 commit 8c57f27
Show file tree
Hide file tree
Showing 27 changed files with 326 additions and 26 deletions.
27 changes: 26 additions & 1 deletion src/bridge/LeafMessageBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,32 @@ import {Ownable} from "@openzeppelin5/contracts/access/Ownable.sol";

import {ILeafMessageBridge} from "../interfaces/bridge/ILeafMessageBridge.sol";

/// @title Message Bridge Contract
/*
██╗ ██╗███████╗██╗ ██████╗ ██████╗ ██████╗ ██████╗ ███╗ ███╗███████╗
██║ ██║██╔════╝██║ ██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗████╗ ████║██╔════╝
██║ ██║█████╗ ██║ ██║ ██║██║ ██║██████╔╝██║ ██║██╔████╔██║█████╗
╚██╗ ██╔╝██╔══╝ ██║ ██║ ██║██║ ██║██╔══██╗██║ ██║██║╚██╔╝██║██╔══╝
╚████╔╝ ███████╗███████╗╚██████╔╝██████╔╝██║ ██║╚██████╔╝██║ ╚═╝ ██║███████╗
╚═══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
███████╗██╗ ██╗██████╗ ███████╗██████╗ ██████╗██╗ ██╗ █████╗ ██╗███╗ ██╗
██╔════╝██║ ██║██╔══██╗██╔════╝██╔══██╗██╔════╝██║ ██║██╔══██╗██║████╗ ██║
███████╗██║ ██║██████╔╝█████╗ ██████╔╝██║ ███████║███████║██║██╔██╗ ██║
╚════██║██║ ██║██╔═══╝ ██╔══╝ ██╔══██╗██║ ██╔══██║██╔══██║██║██║╚██╗██║
███████║╚██████╔╝██║ ███████╗██║ ██║╚██████╗██║ ██║██║ ██║██║██║ ╚████║
╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝
███╗ ███╗███████╗███████╗███████╗ █████╗ ██████╗ ███████╗██████╗ ██████╗ ██╗██████╗ ██████╗ ███████╗
████╗ ████║██╔════╝██╔════╝██╔════╝██╔══██╗██╔════╝ ██╔════╝██╔══██╗██╔══██╗██║██╔══██╗██╔════╝ ██╔════╝
██╔████╔██║█████╗ ███████╗███████╗███████║██║ ███╗█████╗ ██████╔╝██████╔╝██║██║ ██║██║ ███╗█████╗
██║╚██╔╝██║██╔══╝ ╚════██║╚════██║██╔══██║██║ ██║██╔══╝ ██╔══██╗██╔══██╗██║██║ ██║██║ ██║██╔══╝
██║ ╚═╝ ██║███████╗███████║███████║██║ ██║╚██████╔╝███████╗██████╔╝██║ ██║██║██████╔╝╚██████╔╝███████╗
╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═════╝ ╚═╝ ╚═╝╚═╝╚═════╝ ╚═════╝ ╚══════╝
*/

/// @title Velodrome Superchain Leaf Message Bridge
/// @notice General purpose message bridge contract
contract LeafMessageBridge is ILeafMessageBridge, Ownable {
/// @inheritdoc ILeafMessageBridge
Expand Down
27 changes: 26 additions & 1 deletion src/bridge/TokenBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,32 @@ import {IXERC20} from "../interfaces/xerc20/IXERC20.sol";
import {Commands} from "../libraries/Commands.sol";
import {ChainRegistry} from "./ChainRegistry.sol";

/// @title Token Bridge Contract
/*
██╗ ██╗███████╗██╗ ██████╗ ██████╗ ██████╗ ██████╗ ███╗ ███╗███████╗
██║ ██║██╔════╝██║ ██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗████╗ ████║██╔════╝
██║ ██║█████╗ ██║ ██║ ██║██║ ██║██████╔╝██║ ██║██╔████╔██║█████╗
╚██╗ ██╔╝██╔══╝ ██║ ██║ ██║██║ ██║██╔══██╗██║ ██║██║╚██╔╝██║██╔══╝
╚████╔╝ ███████╗███████╗╚██████╔╝██████╔╝██║ ██║╚██████╔╝██║ ╚═╝ ██║███████╗
╚═══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
███████╗██╗ ██╗██████╗ ███████╗██████╗ ██████╗██╗ ██╗ █████╗ ██╗███╗ ██╗
██╔════╝██║ ██║██╔══██╗██╔════╝██╔══██╗██╔════╝██║ ██║██╔══██╗██║████╗ ██║
███████╗██║ ██║██████╔╝█████╗ ██████╔╝██║ ███████║███████║██║██╔██╗ ██║
╚════██║██║ ██║██╔═══╝ ██╔══╝ ██╔══██╗██║ ██╔══██║██╔══██║██║██║╚██╗██║
███████║╚██████╔╝██║ ███████╗██║ ██║╚██████╗██║ ██║██║ ██║██║██║ ╚████║
╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝
████████╗ ██████╗ ██╗ ██╗███████╗███╗ ██╗██████╗ ██████╗ ██╗██████╗ ██████╗ ███████╗
╚══██╔══╝██╔═══██╗██║ ██╔╝██╔════╝████╗ ██║██╔══██╗██╔══██╗██║██╔══██╗██╔════╝ ██╔════╝
██║ ██║ ██║█████╔╝ █████╗ ██╔██╗ ██║██████╔╝██████╔╝██║██║ ██║██║ ███╗█████╗
██║ ██║ ██║██╔═██╗ ██╔══╝ ██║╚██╗██║██╔══██╗██╔══██╗██║██║ ██║██║ ██║██╔══╝
██║ ╚██████╔╝██║ ██╗███████╗██║ ╚████║██████╔╝██║ ██║██║██████╔╝╚██████╔╝███████╗
╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝╚═════╝ ╚═╝ ╚═╝╚═╝╚═════╝ ╚═════╝ ╚══════╝
*/

/// @title Velodrome Superchain Token Bridge
/// @notice General Purpose Token Bridge
contract TokenBridge is ITokenBridge, IHLHandler, ISpecifiesInterchainSecurityModule, ChainRegistry {
using EnumerableSet for EnumerableSet.UintSet;
Expand Down
2 changes: 1 addition & 1 deletion src/bridge/hyperlane/LeafHLMessageModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {Commands} from "../../libraries/Commands.sol";
import {IXERC20} from "../../interfaces/xerc20/IXERC20.sol";
import {ISpecifiesInterchainSecurityModule} from "../../interfaces/external/ISpecifiesInterchainSecurityModule.sol";

/// @title Hyperlane Token Bridge
/// @title Leaf Hyperlane Message Module
/// @notice Hyperlane module used to bridge arbitrary messages between chains
contract LeafHLMessageModule is ILeafHLMessageModule, ISpecifiesInterchainSecurityModule, Ownable {
using SafeERC20 for IERC20;
Expand Down
2 changes: 2 additions & 0 deletions src/fees/CustomFeeModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import {IFeeModule, ICustomFeeModule} from "../interfaces/fees/ICustomFeeModule.
import {IPoolFactory} from "../interfaces/pools/IPoolFactory.sol";
import {IPool} from "../interfaces/pools/IPool.sol";

/// @title Velodrome Superchain Custom Fee Module
/// @notice Used to set custom fees on Velodrome Pools
contract CustomFeeModule is ICustomFeeModule {
/// @inheritdoc IFeeModule
IPoolFactory public immutable factory;
Expand Down
27 changes: 26 additions & 1 deletion src/gauges/LeafGauge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,32 @@ import {VelodromeTimeLibrary} from "../libraries/VelodromeTimeLibrary.sol";

import {ILeafMessageBridge} from "../interfaces/bridge/ILeafMessageBridge.sol";

/// @title Velodrome Superchain Gauge Contracts
/*
██╗ ██╗███████╗██╗ ██████╗ ██████╗ ██████╗ ██████╗ ███╗ ███╗███████╗
██║ ██║██╔════╝██║ ██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗████╗ ████║██╔════╝
██║ ██║█████╗ ██║ ██║ ██║██║ ██║██████╔╝██║ ██║██╔████╔██║█████╗
╚██╗ ██╔╝██╔══╝ ██║ ██║ ██║██║ ██║██╔══██╗██║ ██║██║╚██╔╝██║██╔══╝
╚████╔╝ ███████╗███████╗╚██████╔╝██████╔╝██║ ██║╚██████╔╝██║ ╚═╝ ██║███████╗
╚═══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
███████╗██╗ ██╗██████╗ ███████╗██████╗ ██████╗██╗ ██╗ █████╗ ██╗███╗ ██╗
██╔════╝██║ ██║██╔══██╗██╔════╝██╔══██╗██╔════╝██║ ██║██╔══██╗██║████╗ ██║
███████╗██║ ██║██████╔╝█████╗ ██████╔╝██║ ███████║███████║██║██╔██╗ ██║
╚════██║██║ ██║██╔═══╝ ██╔══╝ ██╔══██╗██║ ██╔══██║██╔══██║██║██║╚██╗██║
███████║╚██████╔╝██║ ███████╗██║ ██║╚██████╗██║ ██║██║ ██║██║██║ ╚████║
╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝
██╗ ███████╗ █████╗ ███████╗ ██████╗ █████╗ ██╗ ██╗ ██████╗ ███████╗
██║ ██╔════╝██╔══██╗██╔════╝██╔════╝ ██╔══██╗██║ ██║██╔════╝ ██╔════╝
██║ █████╗ ███████║█████╗ ██║ ███╗███████║██║ ██║██║ ███╗█████╗
██║ ██╔══╝ ██╔══██║██╔══╝ ██║ ██║██╔══██║██║ ██║██║ ██║██╔══╝
███████╗███████╗██║ ██║██║ ╚██████╔╝██║ ██║╚██████╔╝╚██████╔╝███████╗
╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝
*/

/// @title Velodrome Superchain Leaf Gauge Contracts
/// @notice Leaf gauge contract for distribution of emissions by address
contract LeafGauge is ILeafGauge, ReentrancyGuard {
using SafeERC20 for IERC20;
Expand Down
35 changes: 34 additions & 1 deletion src/gauges/LeafGaugeFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,40 @@ import {ILeafGaugeFactory} from "../interfaces/gauges/ILeafGaugeFactory.sol";
import {IPool} from "../interfaces/pools/IPool.sol";
import {LeafGauge} from "./LeafGauge.sol";

/// @notice Factory that creates leaf gauges on the superchain
/*
██╗ ██╗███████╗██╗ ██████╗ ██████╗ ██████╗ ██████╗ ███╗ ███╗███████╗
██║ ██║██╔════╝██║ ██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗████╗ ████║██╔════╝
██║ ██║█████╗ ██║ ██║ ██║██║ ██║██████╔╝██║ ██║██╔████╔██║█████╗
╚██╗ ██╔╝██╔══╝ ██║ ██║ ██║██║ ██║██╔══██╗██║ ██║██║╚██╔╝██║██╔══╝
╚████╔╝ ███████╗███████╗╚██████╔╝██████╔╝██║ ██║╚██████╔╝██║ ╚═╝ ██║███████╗
╚═══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
███████╗██╗ ██╗██████╗ ███████╗██████╗ ██████╗██╗ ██╗ █████╗ ██╗███╗ ██╗
██╔════╝██║ ██║██╔══██╗██╔════╝██╔══██╗██╔════╝██║ ██║██╔══██╗██║████╗ ██║
███████╗██║ ██║██████╔╝█████╗ ██████╔╝██║ ███████║███████║██║██╔██╗ ██║
╚════██║██║ ██║██╔═══╝ ██╔══╝ ██╔══██╗██║ ██╔══██║██╔══██║██║██║╚██╗██║
███████║╚██████╔╝██║ ███████╗██║ ██║╚██████╗██║ ██║██║ ██║██║██║ ╚████║
╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝
██╗ ███████╗ █████╗ ███████╗ ██████╗ █████╗ ██╗ ██╗ ██████╗ ███████╗
██║ ██╔════╝██╔══██╗██╔════╝██╔════╝ ██╔══██╗██║ ██║██╔════╝ ██╔════╝
██║ █████╗ ███████║█████╗ ██║ ███╗███████║██║ ██║██║ ███╗█████╗
██║ ██╔══╝ ██╔══██║██╔══╝ ██║ ██║██╔══██║██║ ██║██║ ██║██╔══╝
███████╗███████╗██║ ██║██║ ╚██████╔╝██║ ██║╚██████╔╝╚██████╔╝███████╗
╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝
███████╗ █████╗ ██████╗████████╗ ██████╗ ██████╗ ██╗ ██╗
██╔════╝██╔══██╗██╔════╝╚══██╔══╝██╔═══██╗██╔══██╗╚██╗ ██╔╝
█████╗ ███████║██║ ██║ ██║ ██║██████╔╝ ╚████╔╝
██╔══╝ ██╔══██║██║ ██║ ██║ ██║██╔══██╗ ╚██╔╝
██║ ██║ ██║╚██████╗ ██║ ╚██████╔╝██║ ██║ ██║
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝
*/

/// @title Velodrome Superchain Leaf Gauge Factory
/// @notice Used to deploy Leaf Gauge contracts for distribution of emissions
contract LeafGaugeFactory is ILeafGaugeFactory {
using CreateXLibrary for bytes11;

Expand Down
Loading

0 comments on commit 8c57f27

Please sign in to comment.