-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
8c11b01
commit 119d35e
Showing
2 changed files
with
30 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,5 @@ broadcast | |
.vscode/slither-results.json | ||
|
||
# mythril | ||
bin | ||
bin | ||
.DS_Store |
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,28 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
|
||
pragma solidity ^0.8.20; | ||
|
||
/** | ||
* @title Storage | ||
* @dev Store & retrieve value in a variable | ||
* @custom:dev-run-script ./scripts/deploy_with_ethers.ts | ||
*/ | ||
contract Storage { | ||
uint256 number; | ||
|
||
/** | ||
* @dev Store value in variable | ||
* @param num value to store | ||
*/ | ||
function store(uint256 num) public { | ||
number = num; | ||
} | ||
|
||
/** | ||
* @dev Return value | ||
* @return value of 'number' | ||
*/ | ||
function retrieve() public view returns (uint256) { | ||
return number; | ||
} | ||
} |