Last active
May 9, 2021 19:12
-
-
Save percybolmer/d9ca7fb02ac7e985cc44dd79b5768a92 to your computer and use it in GitHub Desktop.
A gist showing how we can create a struct in solidity
This file contains hidden or 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
/** | |
* @notice | |
* A stake struct is used to represent the way we store stakes, | |
* A Stake will contain the users address, the amount staked and two time stamps, | |
* Since which is when the stake was made | |
* Until is the end date of the stake | |
*/ | |
struct Stake{ | |
address user; | |
uint256 amount; | |
uint256 since; | |
uint256 until; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment