Proof of Position
  • â„šī¸What is POPP?
    • Position Verification
    • Cryptographic Linking of Social Profiles
    • Cryptographic Linking of Communication Channels
    • Access to Exclusive Online Spaces
  • âš™ī¸How does it work?
    • đŸ•´ī¸Employer Badge
      • How do I get one?
    • 🔑Employee Access Card
    • 📃Employee Badge
  • đŸš´â€â™€ī¸Quick Start
    • Employer Badge
    • Employee Access Card
    • Employee Badge
    • Token Gates
  • â›“ī¸Reference
    • Employer Badge
    • Employee Badge
    • Employee Access Card
  • đŸ”ĻCode Audit
  • 🛒POPP Job Marketplace
Powered by GitBook
On this page
  • mintFor
  • getEmployerId
  • burn
  1. Reference

Employee Badge

A deep dive into the various methods in the Employee Badge ERC-721 contract

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

mintFor

Used for onboarding new employees. This external function allows verified employers to add a given wallet to their organisation and define a tokenUri which will contain the ipfs CID pointer to the json file representing the job details in the standard NFT json schema.

uint256 _tokenId = employeeNft.mintFor(0x3DdDF83eDD1aa846c4e75f0592AE60C4D1C1C1c6, "QmU2EXy9qKZd1H6ngxQMSY9vdbDyiVD8c8EEnaQqqW839d");
{
  "name": "Chief Technology Officer",
  "image": "ipfs://QmXVPmiW6uq6c9XDKkFeQjU6KVjCq4wi5zksaE5WwSwbAX",
  "employer": "Hooli",
  "attributes": [
    {
      "display_type": "date",
      "trait_type": "start date",
      "value": 1546360800
    },
    {
      "trait_type": "Employer",
      "value": "Hooli"
    },
    {
      "trait_type": "Department",
      "value": "Internal Solutions"
    },
    {
      "trait_type": "Governance Level",
      "value": "Board of Directors"
    },
    {
      "trait_type": "Special Groups",
      "value": "Hooli X"
    }
  ]
}

getEmployerId

An easy way to get the current employer id for a give employee NFT id.

uint256 _employerId = employeeNft.getEmployerId(1)

burn

As a token holder (employee) or token granter (employer) you can terminate the employment within that organisation at any given time. This is done by burning the employee badge.

employeeNft.burn(_tokenId);
PreviousEmployer BadgeNextEmployee Access Card

Last updated 1 year ago

â›“ī¸