From eda1d53752d18cd37334f8ccbe8a1105ba6b493c Mon Sep 17 00:00:00 2001
From: Patrice Tisserand
Date: Wed, 27 Mar 2024 02:09:27 +0100
Subject: [PATCH] fix/audit: [M-03] Unchecked parameter
---
apps/blockchain/ethereum/src/Bridge.sol | 2 +-
apps/blockchain/ethereum/src/State.sol | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/apps/blockchain/ethereum/src/Bridge.sol b/apps/blockchain/ethereum/src/Bridge.sol
index 00c09e11..836f5c8b 100644
--- a/apps/blockchain/ethereum/src/Bridge.sol
+++ b/apps/blockchain/ethereum/src/Bridge.sol
@@ -58,7 +58,7 @@ contract Starklane is IStarklaneEvent, UUPSOwnableProxied, StarklaneState, Stark
_transferOwnership(owner);
- setStarklaneL2Address(Cairo.snaddressWrap(starklaneL2Address));
+ setStarklaneL2Address(starklaneL2Address);
setStarklaneL2Selector(starklaneL2Selector);
}
diff --git a/apps/blockchain/ethereum/src/State.sol b/apps/blockchain/ethereum/src/State.sol
index f9de5c95..1719a27c 100644
--- a/apps/blockchain/ethereum/src/State.sol
+++ b/apps/blockchain/ethereum/src/State.sol
@@ -40,12 +40,12 @@ contract StarklaneState is Ownable {
@param l2Address Starklane L2 address.
*/
function setStarklaneL2Address(
- snaddress l2Address
+ uint256 l2Address
)
public
onlyOwner
{
- _starklaneL2Address = l2Address;
+ _starklaneL2Address = Cairo.snaddressWrap(l2Address);
}
/**