forked from matter-labs/zksync-era
-
Notifications
You must be signed in to change notification settings - Fork 1
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
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
core/tests/vm-benchmark/deployment_benchmarks_sources/fibonacci_rec.sol
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,19 @@ | ||
pragma solidity ^0.8.0; | ||
|
||
contract benchmark { | ||
uint256 value; | ||
constructor() { | ||
value = fib(25); | ||
} | ||
|
||
function get_calculation() public view returns (uint256) { | ||
return value; | ||
} | ||
|
||
function fib(uint256 n) internal returns (uint256) { | ||
if (n <= 1) { | ||
return n; | ||
} | ||
return fib(n - 1) + fib(n - 2); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
core/tests/vm-benchmark/deployment_benchmarks_sources/send.sol
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,8 @@ | ||
pragma solidity >=0.8.20; | ||
|
||
contract Send { | ||
constructor() { | ||
address payable self = payable(msg.sender); | ||
self.call{value: 100}; | ||
} | ||
} |