Employer Badge

A deep dive into the various methods in the Employer Badge ERC-1155 contract

The following assumes you have installed the required interface package and imported the working contract into your codebase.

employerIdFromWallet

This external function allows anyone to get an employer's unique identifier from any given wallet. This can be used to verify a particular message sender is a POPP verified employer from a particular organisation.

uint256 _employerId = employerSft.employerIdFromWallet(msg.sender);
require(_employerId == 1, "You need to be a Hooli employer to access");

addToMyTeam

Once you become a verified employer, you can now add wallets to your team using the addToMyTeam method. This will will allow you to scale the onboarding process for your organisation.

employerSft.addToMyTeam(_newEmployerWallet);

removeFromMyTeam

You can remove any team member using the external removeFromMyTeam function. This will burn the token and set the `inValidFrom` date (as a timestamp).

The invalidFrom timestamp is used for when an employer's wallet is compromised and any activity holding that token becomes invalid.

employerSft.removeFromMyTeam(_employerWallet, 1546360800);

invalidFrom

A way to check the timestamp when a given employer wallet was removed form the team.

employerSft.invalidFrom(_employerWallet);

Last updated