Skip to content

Instantly share code, notes, and snippets.

@mudgen
Created July 23, 2021 20:29
// 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