mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
used params.chainId instead of bool to check
This commit is contained in:
parent
595e4fb620
commit
382366e006
|
@ -18,19 +18,14 @@ abstract contract Resolver is Helpers {
|
||||||
* @dev Bridge Token.
|
* @dev Bridge Token.
|
||||||
* @notice Bridge Token on HOP.
|
* @notice Bridge Token on HOP.
|
||||||
* @param params BridgeParams struct for bridging
|
* @param params BridgeParams struct for bridging
|
||||||
* @param bridgeToL1 bool to check which layer to migrate to
|
|
||||||
* @param getId ID to retrieve amount from last spell.
|
* @param getId ID to retrieve amount from last spell.
|
||||||
*/
|
*/
|
||||||
function bridge(
|
function bridge(BridgeParams memory params, uint256 getId)
|
||||||
BridgeParams memory params,
|
|
||||||
bool bridgeToL1,
|
|
||||||
uint256 getId
|
|
||||||
)
|
|
||||||
external
|
external
|
||||||
payable
|
payable
|
||||||
returns (string memory _eventName, bytes memory _eventParam)
|
returns (string memory _eventName, bytes memory _eventParam)
|
||||||
{
|
{
|
||||||
if (bridgeToL1) {
|
if (params.chainId == 1) {
|
||||||
require(
|
require(
|
||||||
params.destinationAmountOutMin == 0,
|
params.destinationAmountOutMin == 0,
|
||||||
"destinationAmountOutMin != 0, sending to L1"
|
"destinationAmountOutMin != 0, sending to L1"
|
||||||
|
|
|
@ -18,19 +18,14 @@ abstract contract Resolver is Helpers {
|
||||||
* @dev Bridge Token.
|
* @dev Bridge Token.
|
||||||
* @notice Bridge Token on HOP.
|
* @notice Bridge Token on HOP.
|
||||||
* @param params BridgeParams struct for bridging
|
* @param params BridgeParams struct for bridging
|
||||||
* @param bridgeToL1 bool to check which layer to migrate to
|
|
||||||
* @param getId ID to retrieve amount from last spell.
|
* @param getId ID to retrieve amount from last spell.
|
||||||
*/
|
*/
|
||||||
function bridge(
|
function bridge(BridgeParams memory params, uint256 getId)
|
||||||
BridgeParams memory params,
|
|
||||||
bool bridgeToL1,
|
|
||||||
uint256 getId
|
|
||||||
)
|
|
||||||
external
|
external
|
||||||
payable
|
payable
|
||||||
returns (string memory _eventName, bytes memory _eventParam)
|
returns (string memory _eventName, bytes memory _eventParam)
|
||||||
{
|
{
|
||||||
if (bridgeToL1) {
|
if (params.chainId == 1) {
|
||||||
require(
|
require(
|
||||||
params.destinationAmountOutMin == 0,
|
params.destinationAmountOutMin == 0,
|
||||||
"destinationAmountOutMin != 0, sending to L1"
|
"destinationAmountOutMin != 0, sending to L1"
|
||||||
|
|
|
@ -18,19 +18,14 @@ abstract contract Resolver is Helpers {
|
||||||
* @dev Bridge Token.
|
* @dev Bridge Token.
|
||||||
* @notice Bridge Token on HOP.
|
* @notice Bridge Token on HOP.
|
||||||
* @param params BridgeParams struct for bridging
|
* @param params BridgeParams struct for bridging
|
||||||
* @param bridgeToL1 bool to check which layer to migrate to
|
|
||||||
* @param getId ID to retrieve amount from last spell.
|
* @param getId ID to retrieve amount from last spell.
|
||||||
*/
|
*/
|
||||||
function bridge(
|
function bridge(BridgeParams memory params, uint256 getId)
|
||||||
BridgeParams memory params,
|
|
||||||
bool bridgeToL1,
|
|
||||||
uint256 getId
|
|
||||||
)
|
|
||||||
external
|
external
|
||||||
payable
|
payable
|
||||||
returns (string memory _eventName, bytes memory _eventParam)
|
returns (string memory _eventName, bytes memory _eventParam)
|
||||||
{
|
{
|
||||||
if (bridgeToL1) {
|
if (params.chainId == 1) {
|
||||||
require(
|
require(
|
||||||
params.destinationAmountOutMin == 0,
|
params.destinationAmountOutMin == 0,
|
||||||
"destinationAmountOutMin != 0, sending to L1"
|
"destinationAmountOutMin != 0, sending to L1"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user