This repository contains the smart contracts and related scripts for the HR_Project_Web3Bridge, a blockchain-based solution for managing organizations and contracts. The project leverages Foundry for development, testing, and deployment of Solidity smart contracts.
- OrganizationFactory: 0xe1db6db5f799feeb969088ac1ec7072b295a55a0
- OrganizationContract: 0xe90d6a043c34ab9c03f541e99c21dbe48d14e92b
- OrganizationFactory: 0x3677f7827760016702d034837bd2fb8e6ba618dd
- OrganizationContract: 0xab9929600ad5026431ca61e742d5a224f205fe23
- Overview
- Project Structure
- Installation
- Usage
- Smart Contracts
- Testing
- Deployment
- Contributing
- License
HR_Project_Web3Bridge is a decentralized solution that enables organizations to manage their operations on the blockchain. The project consists of multiple smart contracts that handle organization creation, management, and token operations.
- Organization creation and management
- Token management system
- Secure contract interactions
- Full test coverage
- Foundry-based development environment
contracts/
├── src/
│ ├── contracts/ # Main contract implementations
│ ├── interfaces/ # Contract interfaces
│ └── libraries/ # Shared libraries and utilities
├── script/ # Deployment scripts
├── test/ # Contract test files
└── lib/ # Dependencies and libraries
-
Prerequisites
- Foundry
- Git
-
Clone the Repository
git clone <repository-url> cd HR_Project_Web3Bridge/contracts
-
Install Dependencies
forge install
forge buildforge testforge script script/deploy.s.sol --rpc-url <your-rpc-url> --private-key <your-private-key> --broadcast- Main contract for creating and managing organizations
- Handles organization deployment and registration
- Maintains organization registry
- Implements organization-specific logic
- Manages organization members and roles
- Handles organization-specific operations
- IERC20.sol: Standard ERC20 interface implementation
- Tokens.sol: Token management functionality
- errors.sol: Custom error definitions
- structs.sol: Shared data structures
The project includes comprehensive tests for all smart contracts. Test files are located in the test/ directory:
- OrganizationContract.t.sol
- OrganizationFactory.t.sol
- Token.t.sol
To run specific tests:
forge test --match-contract OrganizationFactoryTestThe project uses Foundry's deployment system through scripts in the script/ directory. The main deployment script is deploy.s.sol.
# Deploy to local network
forge script script/deploy.s.sol --fork-url http://localhost:8545 --broadcast
# Deploy to testnet
forge script script/deploy.s.sol --rpc-url <testnet-rpc> --private-key <pk> --broadcast --verifyVerification commands can be found in verify_command.txt
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request