Welcome to the Ethereum Job Portal Smart Contract repository. This smart contract aims to connect unskilled and unorganized migrant workers with job providers while eliminating the exploitation by middlemen. It allows workers to create profiles, apply for jobs, and receive ratings from job providers.
The Ethereum Job Portal Smart Contract is designed to facilitate the connection between job seekers (applicants) and job providers. It includes the following features:
- Applicants are registered by admin with their profiles, including details such as name, experience, skills, and more.
- Job providers can post new job listings with details like job title, description, salary, and experience requirements.
- Applicants can apply for jobs they are interested in.
- Job providers can hire applicants for their posted jobs.
- Job providers can provide ratings for applicants they've hired.
addApplicant(string name, uint experience, string[] skills, address applicantAddress)
: Allows the admin to add new applicants to the portal. Applicants provide their name, experience, skills, and Ethereum address.
getApplicantDetails(uint256 applicantId)
: Retrieves detailed information about an applicant using their unique ID.
addJob(string title, string description, uint experienceNeeded, uint256 salary) payable
: Enables job providers to post new job listings. Job providers pay 1 ether to list a job.
getJobDetails(uint256 jobId)
: Retrieves detailed information about a job using its unique ID.
applyForJob(uint256 jobId)
: Allows applicants to apply for jobs they are interested in. It checks for applicant availability and prevents duplicate applications.
hireApplicant(uint jobId, uint applicantId)
: Permits job providers to hire applicants that have applied for specific job. It marks the applicant as "unavailable" as they get hired.
provideRating(uint256 jobId, uint256 applicantId, uint256 rating)
: Lets job providers rate applicants they've hired. Ratings range from 1 to 5 and prevent double rating.
To interact with this smart contract, you can deploy it to the Ethereum network using tools like Remix or Hardhat. Make sure to have Ethereum accounts with Ether for gas fees.
To compile and deploy the contract, follow these steps:
- Clone this repository to your local machine using:
git clone https://github.com/gkirat/Job-portal.git
- Install a development environment for Ethereum (e.g., Remix, Hardhat).
- Deploy the contract to the Testnet network.
- Interact with the contract using its functions.
Contributions and improvements to this project are welcome. Please follow these steps to contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and test thoroughly.
- Create a pull request with a clear description of the changes.
This Ethereum Job Portal Smart Contract is open-source and available under the MIT License. Feel free to use and modify it for your own projects.
This smart contract is provided for educational purposes and as a starting point for building decentralized applications. Please be aware of the potential risks and security considerations when deploying and using smart contracts on the Ethereum blockchain.
Use this code responsibly and at your own risk.
If you have any questions or need assistance, feel free to contact me.