BaseBridge

Git Source

Title: Base bridge contract

Author: Malda Protocol

Abstract base for cross-chain bridge implementations with role-based access control

State Variables

roles

Roles contract for access control

IRoles public roles

Functions

onlyBridgeConfigurator

Modifier to check if the caller is the bridge configurator

modifier onlyBridgeConfigurator() ;

onlyRebalancer

Modifier to check if the caller is the rebalancer

modifier onlyRebalancer() ;

constructor

Initializes the base bridge

constructor(address _roles) ;

Parameters

NameTypeDescription
_rolesaddressRoles contract address

Errors

BaseBridge_NotAuthorized

Error thrown when caller is not authorized

error BaseBridge_NotAuthorized();

BaseBridge_AmountMismatch

Error thrown when amount mismatch

error BaseBridge_AmountMismatch();

BaseBridge_AmountNotValid

Error thrown when amount is not valid

error BaseBridge_AmountNotValid();

BaseBridge_AddressNotValid

Error thrown when address is not valid

error BaseBridge_AddressNotValid();