...
/Smart Contract: Create and Apply for Jobs
Smart Contract: Create and Apply for Jobs
Learn to extend our smart contract to allow users to create and apply for jobs.
We'll cover the following...
In this lesson, we’ll focus on adding extra features to our smart contract. Currently, we can create profiles; now we’ll extend this to let users create listings for jobs or apply for them.
Creating a job offer
We’ll begin with the function for creating job offers. Paste the updated code content into the Remix workspace, and then we’ll go through the changes.
Press + to interact
SolJobs.sol
constants.sol
enums.sol
structs.sol
// SPDX-License-Identifier: GPL-3.0pragma solidity >=0.7.0 <0.9.0;import "./enums.sol";struct CreatorProfile {uint id;string email;string name;string tagline;string description;address creatorAddress;bool verified;ProfileType profileType;uint[] jobOfferIDs;}struct ApplicantProfile {uint id;address applicantAddress;string fullname;string email;string location;string bio;ProfileType profileType;uint[] applicationIDs;}struct JobOffer {uint id;string title;string description;uint compensation;CreatorProfile creator;JobApplication[] applications;}struct JobApplication {uint id;uint jobOfferId;string coverLetter;ApplicantProfile applicant;JobApplicationStatus status;}
...