-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from gyrostable/support-cross-l2-bridge
Add logic to allow cross-l2 bridging
- Loading branch information
Showing
7 changed files
with
233 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.17; | ||
|
||
interface IGydBridge { | ||
struct ChainMetadata { | ||
address targetAddress; | ||
uint256 gasLimit; | ||
} | ||
|
||
struct ChainData { | ||
uint64 chainSelector; | ||
ChainMetadata metadata; | ||
} | ||
|
||
/// @notice This event is emitted when a new chain is added | ||
event ChainAdded( | ||
uint64 indexed chainSelector, | ||
address indexed targetAddress, | ||
uint256 gasLimit | ||
); | ||
|
||
/// @notice This event is emitted when the gas limit is updated | ||
event GasLimitUpdated(uint64 indexed chainSelector, uint256 gasLimit); | ||
|
||
/// @notice This event is emitted when the GYD is bridged | ||
event GYDBridged( | ||
uint64 indexed chainSelector, | ||
address indexed bridger, | ||
uint256 amount, | ||
uint256 total | ||
); | ||
|
||
/// @notice This event is emitted when the GYD is claimed | ||
event GYDClaimed( | ||
uint64 indexed chainSelector, | ||
address indexed bridger, | ||
uint256 amount, | ||
uint256 total | ||
); | ||
|
||
/// @notice This error is raised if message from the bridge is invalid | ||
error MessageInvalid(); | ||
|
||
/// @notice This error is raised if the chain is not supported | ||
error ChainNotSupported(uint64 chainSelector); | ||
|
||
/// @notice This error is raised if the msg value is not enough for the fees | ||
error FeesNotCovered(uint256 fees); | ||
} |
Oops, something went wrong.