Skip to content

Commit

Permalink
feat: create Storage.sol contract
Browse files Browse the repository at this point in the history
  • Loading branch information
phenix3443 committed Jun 28, 2024
1 parent 8c11b01 commit 119d35e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ broadcast
.vscode/slither-results.json

# mythril
bin
bin
.DS_Store
28 changes: 28 additions & 0 deletions src/Storage.sol
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;
}
}

0 comments on commit 119d35e

Please sign in to comment.