The AppStorage pattern uses a deterministic storage slot to organize contract data:
library AppStorage {
bytes32 constant POSITION = keccak256("app.storage.v1");
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.20; | |
| import "@openzeppelin/contracts/proxy/Clones.sol"; | |
| import "@openzeppelin/contracts/access/AccessControl.sol"; | |
| import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; | |
| /// @title MultiFactory Contract for creating clones of multiple implementations | |
| /// @dev Extends AccessControl and Initializable from OpenZeppelin | |
| contract MultiFactory is AccessControl, Initializable { |
| Your Neovim (`v0.11.2`) uses **Vim-Plug** with plugins in `~/.vim/plugged`: `coc.nvim` (LSP), `papercolor-theme` (theme), `fzf` (fuzzy finder), `tagbar` (code tags), `vim-go` (Go support, causing `noshellslash` error), `nerdtree` (file explorer), `vim-multiple-cursors` (multi-cursor editing), and `vim-solidity` (Solidity syntax). Config is in `~/.config/nvim/init.vim`, with settings for syntax, indentation, search, and `coc.nvim` mappings. No `~/.vimrc` or `init.lua`. | |
| **To reset and reinstall** (avoiding `vim-go`): | |
| ```bash | |
| cp -r ~/.config/nvim ~/.config/nvim.bak | |
| rm -rf ~/.vim/plugged ~/.local/share/nvim ~/.cache/nvim ~/.config/nvim | |
| curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
| mkdir -p ~/.config/nvim && nvim ~/.config/nvim/init.vim | |
| # Paste: call plug#begin('~/.vim/plugged') | Plug 'preservim/nerdtree' | Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | Plug 'junegunn/fzf.vim' | Plug 'vim-airline/vim-airline' | Plug ' |
| Instructions | |
| You are an expert [SPECIFY DOMAIN: e.g., technical architect, business strategist, UX designer, data scientist]. | |
| Your task is to approach the following problem/task with deep expertise and systematic thinking. | |
| Process | |
| Step 1: Generate Options | |
| Silently generate 5-7 distinct, high-quality options or recommendations for [SPECIFY TASK/PROBLEM]. | |
| Each option should be: | |
| Clear and specific | |
| Actionable with concrete next steps |