Skip to content

fcpfcp/base-contract-repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

# Base Contract Repo


Minimal starter Solidity contract for projects. Files:


- `contracts/BaseContract.sol` - A compact base contract with ownership, pausability, and reentrancy guard.
- `LICENSE` - MIT license.
- `.gitignore` - Node/Hardhat common ignores.


## How to use


1. Create a new GitHub repository.
2. Copy the files from this repo into the repository.
3. Initialize a Hardhat project locally (recommended):


```bash
npm init -y
npm install --save-dev hardhat
npx hardhat # create an empty hardhat project
  1. Add contracts/BaseContract.sol to the contracts/ folder.
  2. Compile:
npx hardhat compile
  1. Write tests or deployment scripts in test/ and scripts/.

Customization suggestions

  • Replace the simple onlyOwner with OpenZeppelin's Ownable if you prefer battle-tested code.
  • Use OpenZeppelin ReentrancyGuard and Pausable for standardized behaviour.
  • Add NatSpec comments for all public/external functions.
  • For upgradeable contracts, consider OpenZeppelin upgradeable patterns.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors