Welcome to the Smart Contracts Repository! This repository contains a collection of smart contracts developed for some of the most widely-used blockchain networks. Each contract is tailored to the specifications of its respective network, providing developers with a wide range of examples to work with. Whether you're working on Ethereum, Binance Smart Chain, Solana, or other platforms, you'll find useful contract examples here.
This repository includes smart contracts for the following blockchain networks:
- Ethereum
- Linea
- Base
- Berachain
- Monad
To work with the smart contracts in this repository, you'll need the following development tools:
- Node.js (v14 or higher)
- Truffle or Hardhat (for Ethereum, BSC, Polygon, etc.)
- Solana CLI (for Solana-specific smart contracts)
- MetaMask or other compatible wallets for testing
- Remix IDE (optional) for quick contract testing and deployment
-
Clone the repository:
git clone https://github.com/mdqst/contracts.git cd contracts
-
Install the dependencies:
-
For EVM contracts:
npm install
-
For Solana contracts:
Make sure you have Rust and Solana CLI installed. Follow the Solana installation guide if needed.
-
Each folder contains deployment guides for deploying the smart contracts on their respective networks.
You can use Hardhat or Truffle to deploy smart contracts:
-
Deploy with Truffle:
truffle migrate --network <network_name>
-
Deploy with Hardhat:
npx hardhat run scripts/deploy.js --network <network_name>
-
Build the contract:
cargo build-bpf
-
Deploy the contract:
solana program deploy <program_file>
Each contract comes with a set of tests written using Mocha/Chai (for EVM) or Rust tests (for Solana). You can run the tests for EVM-compatible networks using:
npx hardhat test
For Solana, run:
cargo test
This repository is licensed under the MIT License. Feel free to use, modify, and distribute the smart contracts within this repository for personal or commercial use.
Contributions are welcome! If you'd like to add a contract for a new blockchain network or improve existing contracts, feel free to submit a pull request.
- Fork the repository
- Create a new branch (
git checkout -b feature/your-feature
) - Commit your changes (
git commit -m 'Add new feature'
) - Push to the branch (
git push origin feature/your-feature
) - Open a pull request
If you have any questions, feel free to reach out via email or create an issue in this repository.
Enjoy working with smart contracts and happy coding! 🎉