BridgeFacet

This is a Solidity contract that implements the IBridge interface. The contract has the following functions:

updateStargateSettings():

updates the settings of the Stargate bridge.

Input

updateWormholeBridgeSettings():

updates the settings of the Wormhole bridge.

Input

The updateStargateSettings and updateWormholeBridgeSettings functions enforce that only the contract owner can call them, using the enforceIsContractOwner function from the LibDiamond library.

updateCelerBridgeSettings():

It's a way to update and manage the settings associated with the Celer Bridge, and its execution is permissioned for the contract owner.

Input

addCelerChainIds():

The function is responsible for updating the contract's settings related to chain IDs. It utilizes a modular approach where logic for handling chain IDs is encapsulated in the LibCeler library. The ownership check at the beginning guarantees that only the contract owner can execute this function.

Input

addMagpieCelerBridgeAddress():

This function is responsible for adding Magpie Celer bridge addresses to the contract's settings, associating them with specific network IDs.

Input

addMagpieStargateBridgeAddresses():

This function is responsible for adding the given bridge addresses to the corresponding network IDs.

Input

addMagpieStargateBridgeV2Address():

This function is responsible for adding the given bridge addresses to the corresponding network IDs.

Input

getWormholeTokenSequence():

This function takes a uint64 parameter tokenSequence and returns a uint64. It calls the getTokenSequence function from the LibWormhole library, passing the tokenSequence as an argument. The purpose of this function is to retrieve and return a transformed version of the tokenSequence using the LibWormhole library.

Input:

Output:

bridgeIn():

This function takes a BridgeInArgs struct as a calldata parameter and does not return a value. It overrides a function declared in an interface or parent contract. It calls the bridgeIn function from the LibBridge library, passing the bridgeInArgs as an argument.

Input:

bridgeOut():

This function takes a BridgeOutArgs struct as a calldata parameter and returns a uint256 value. It overrides a function declared in an interface or parent contract. It calls the bridgeOut function from the LibBridge library, passing the bridgeOutArgs as an argument.

Input:

Last updated