-
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.
Set callback slot to 0 before executing script (#221)
We need to set the callback slot to 0 before executing a script to ensure that nested operations don't inherit the callback value of the parent operation.
- Loading branch information
1 parent
986d547
commit 0123c18
Showing
3 changed files
with
54 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
pragma solidity 0.8.27; | ||
|
||
import {QuarkWalletMetadata} from "quark-core/src/QuarkWallet.sol"; | ||
import {QuarkScript} from "quark-core/src/QuarkScript.sol"; | ||
|
||
contract GetCallbackDetails is QuarkScript { | ||
function getCallbackAddress() public view returns (address) { | ||
bytes32 callbackSlot = QuarkWalletMetadata.CALLBACK_SLOT; | ||
address callbackAddress; | ||
assembly { | ||
callbackAddress := tload(callbackSlot) | ||
} | ||
return callbackAddress; | ||
} | ||
} |
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