Skip to content

Instantly share code, notes, and snippets.

@andrejrakic
Created August 30, 2022 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrejrakic/99ce851f0dad840f8d21b257f03d8e19 to your computer and use it in GitHub Desktop.
Save andrejrakic/99ce851f0dad840f8d21b257f03d8e19 to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: MIT
pragma solidity 0.8.0;
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
contract StorageBug is Ownable {
function write(uint256 number) external onlyOwner {
uint256[] storage arr;
arr.push(number);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment