forked from across-protocol/relayer
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Description Rebasing from the parent repo.
- Loading branch information
Showing
152 changed files
with
5,618 additions
and
2,624 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM node:16 | ||
|
||
WORKDIR /relayer-v2 | ||
WORKDIR /relayer | ||
|
||
COPY . ./ | ||
|
||
|
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,60 @@ | ||
/// This file contains contracts that can be used to unit test the src/clients/bridges/LineaAdapter.ts | ||
/// code which reads events from Linea contracts facilitating cross chain transfers. | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
contract LineaWethBridge { | ||
event MessageClaimed(bytes32 indexed _messageHash); | ||
event MessageSent( | ||
address indexed _from, | ||
address indexed _to, | ||
uint256 _fee, | ||
uint256 _value, | ||
uint256 _nonce, | ||
bytes _calldata, | ||
bytes32 indexed _messageHash | ||
); | ||
|
||
function emitMessageSent(address from, address to, uint256 value) external { | ||
emit MessageSent(from, to, 0, value, 0, new bytes(0), bytes32(0)); | ||
} | ||
|
||
function emitMessageSentWithMessageHash(address from, address to, uint256 value, bytes32 messageHash) external { | ||
emit MessageSent(from, to, 0, value, 0, new bytes(0), messageHash); | ||
} | ||
|
||
function emitMessageClaimed(bytes32 messageHash) external { | ||
emit MessageClaimed(messageHash); | ||
} | ||
} | ||
|
||
contract LineaUsdcBridge { | ||
event Deposited(address indexed depositor, uint256 amount, address indexed to); | ||
event ReceivedFromOtherLayer(address indexed recipient, uint256 amount); | ||
|
||
function emitDeposited(address depositor, address to) external { | ||
emit Deposited(depositor, 0, to); | ||
} | ||
|
||
function emitReceivedFromOtherLayer(address recipient) external { | ||
emit ReceivedFromOtherLayer(recipient, 0); | ||
} | ||
} | ||
|
||
contract LineaERC20Bridge { | ||
event BridgingInitiatedV2(address indexed sender, address indexed recipient, address indexed token, uint256 amount); | ||
event BridgingFinalizedV2( | ||
address indexed nativeToken, | ||
address indexed bridgedToken, | ||
uint256 amount, | ||
address indexed recipient | ||
); | ||
|
||
function emitBridgingInitiated(address sender, address recipient, address token) external { | ||
emit BridgingInitiatedV2(sender, recipient, token, 0); | ||
} | ||
|
||
function emitBridgingFinalized(address l1Token, address recipient) external { | ||
emit BridgingFinalizedV2(l1Token, address(0), 0, recipient); | ||
} | ||
} |
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,24 @@ | ||
/// This file contains contracts that can be used to unit test the src/clients/bridges/op-stack | ||
/// code which reads events from OpStack contracts facilitating cross chain transfers. | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
contract OpStackWethBridge { | ||
event ETHDepositInitiated(address indexed _from, address indexed _to, uint256 _amount, bytes _data); | ||
event DepositFinalized( | ||
address indexed _l1Token, | ||
address indexed _l2Token, | ||
address indexed _from, | ||
address _to, | ||
uint256 _amount, | ||
bytes _data | ||
); | ||
|
||
function emitDepositInitiated(address from, address to, uint256 amount) external { | ||
emit ETHDepositInitiated(from, to, amount, new bytes(0)); | ||
} | ||
|
||
function emitDepositFinalized(address from, address to, uint256 amount) external { | ||
emit DepositFinalized(address(0), address(0), from, to, amount, new bytes(0)); | ||
} | ||
} |
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
Oops, something went wrong.