-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
51 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#pragma evm-version cancun | ||
|
||
@nonreentrant("lock") | ||
@external | ||
def foo() -> uint256: | ||
return 4 |
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,14 @@ | ||
;; (interface! "examples/nonreentrantenforcer.dasy") | ||
(definterface Nonreentrantenforcer | ||
(defn func0 [] :nonpayable)) | ||
|
||
(defvar target (public Nonreentrantenforcer)) | ||
|
||
(defn __init__ [:address target] :external | ||
(set self/target (Nonreentrantenforcer target))) | ||
|
||
(defn callback [] :external | ||
(.func0 self/target)) | ||
|
||
(defn __fallback__ [] :external | ||
(.func0 self/target)) |
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,10 @@ | ||
(pragma :evm-version "paris") | ||
|
||
(defn func0 [] [:external (nonreentrant "lock")] | ||
(raw_call msg/sender b"" :value 0)) | ||
|
||
(defn func1 [] [:external (nonreentrant "lock_2")] | ||
(raw_call msg/sender b"" :value 0)) | ||
|
||
(defn func2 [] [:external (nonreentrant "lock_2")] | ||
(raw_call msg/sender b"" :value 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(pragma :evm-version "cancun") | ||
|
||
(defn func0 [] [:external (nonreentrant "lock")] | ||
(raw_call msg/sender b"" :value 0)) | ||
|
||
(defn func1 [] [:external (nonreentrant "lock_2")] | ||
(raw_call msg/sender b"" :value 0)) | ||
|
||
(defn func2 [] [:external (nonreentrant "lock_2")] | ||
(raw_call msg/sender b"" :value 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