-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update sendMessageToL2 function and add AaveStarknetBridgeUpgradePayload contract #135
base: main
Are you sure you want to change the base?
Conversation
f0d201e
to
5afcf48
Compare
|
||
function execute() external { | ||
try | ||
L1_BRIDGE_PROXY.upgradeTo(L1_BRIDGE_NEW_IMPLEMENTATION_ADDRESS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put upgradeToAndCall here to update revision
contracts/l1/Bridge.sol
Outdated
@@ -312,26 +321,29 @@ contract Bridge is IBridge, Initializable { | |||
(payload[5], payload[6]) = Cairo.toSplitUint(blockNumber); | |||
(payload[7], payload[8]) = Cairo.toSplitUint(currentRewardsIndex); | |||
|
|||
_messagingContract.sendMessageToL2( | |||
uint256 nonce; | |||
(, nonce) = _messagingContract.sendMessageToL2{value: fee}( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In our opinion, there should be some hard limit of this fee ie, 0.1ETH, and revert in case a user sends more. Because, most likely, it can happen only in the case of some bug.
So I would wrap this logic into some internal function because it is used many times in a code.
No description provided.