Created
July 23, 2021 20:29
-
-
Save mudgen/a1e41180bad2aa90be6dd002b3dd3608 to your computer and use it in GitHub Desktop.
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
// AppStorage.sol | |
struct AppStorage { | |
uint256 secondVar; | |
uint256 firstVar; | |
uint256 lastVar; | |
... | |
} | |
// StakingFacet.sol | |
import "./AppStorage.sol" | |
contract Staking { | |
AppStorage internal s; | |
function myFacetFunction() external { | |
s.lastVar = s.firstVar + s.secondVar; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment