Skip to content

SelflessVision/Foundry-Simple-Storage

Repository files navigation

Foundry Simple Storage

Introduction

Foundry Simple Storage is a basic project demonstrating the implementation of a simple storage contract using the Foundry framework. This project serves as an educational tool for understanding the basics of smart contract development, deployment, and interaction on the Ethereum blockchain.

Features

  • Simple storage contract to store and retrieve a single value.
  • Deployment scripts for easy contract deployment.
  • Interaction scripts to read and write data to the contract.
  • Unit tests to ensure the contract functions correctly.

Getting Started

Prerequisites

  • Node.js and npm installed
  • Foundry framework installed

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/foundry-simple-storage.git
    cd foundry-simple-storage
  2. Install dependencies:

    npm install

Usage

  1. Compile the contract:

    forge build
  2. Deploy the contract:

    forge script scripts/Deploy.s.sol
  3. Interact with the contract:

    forge script scripts/Interact.s.sol

Running Tests

Run the unit tests to ensure the contract works as expected:

forge test

Project Structure

  • contracts/: Contains the Solidity smart contract.
  • scripts/: Contains deployment and interaction scripts.
  • test/: Contains unit tests for the smart contract.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License.

About

Foundry version of simple storage contract.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published