EmployeeStockOption

Git Source

Inherits: IssuedAsset

A minimal contract tracking unexercised employee stock options (ESOs). Each “lot” represents a batch of options for a single employee, storing quantity, strike price, etc. In real usage, you'd track vesting schedules and expiry dates too.

State Variables

optionTokens

mapping(bytes32 => OptionToken) public optionTokens;

Functions

initialize

function initialize(address _issuer, string memory _name, string memory _prefix) public virtual initializer;

createOptionToken

Creates a new option lot for an employee.

function createOptionToken(address owner, uint96 quantity, address paymentCurrency, uint96 strikePrice)
    external
    returns (bytes32 tokenId);

Returns

Name
Type
Description

tokenId

bytes32

The ID of the newly created lot.

invalidateOptionToken

Invalidates an option lot, e.g. if it's fully exercised or the employee leaves.

function invalidateOptionToken(bytes32 tokenId) external;

Events

OptionCreated

event OptionCreated(
    bytes32 indexed tokenId, address indexed owner, uint96 quantity, address paymentCurrency, uint96 strikePrice
);

OptionInvalidated

event OptionInvalidated(bytes32 indexed tokenId);

Structs

OptionToken

struct OptionToken {
    bool isValid;
    address owner;
    uint96 quantity;
    address paymentCurrency;
    uint96 strikePrice;
}

Last updated

Was this helpful?