CapSign
  • Home
  • Compliance Framework
  • Interactive Demos
    • Overview
  • Create an Account
  • Identity Verification
  • Investor Qualification
  • Guides for Individuals
    • Invest in an Offering
  • Guides for Corporations
    • Create a Share Class
    • Authorize Shares
    • Issue Shares
    • Upload a Document
    • Create a Document Template
    • Create an Offering
    • Manage Your Offering
    • Add a Trusted Attestor
    • Approve an Investment
  • API Reference
    • Overview
    • Compliance
      • Exemptions
        • FederalExemption.sol
          • FederalExemption
        • RegAExemption.sol
          • RegAExemption
        • RegCFExemption.sol
          • RegCFExemption
        • RegDExemption.sol
          • RegDExemption
        • Rule144Exemption.sol
          • Rule144Exemption
        • Rule701Exemption.sol
          • Rule701Exemption
      • IComplianceModule.sol
        • IComplianceModule
      • Vesting.sol
        • Vesting
    • Currencies
      • WETH.sol
        • WETH
      • CMX.sol
        • CMX
      • USD.sol
        • USD
    • Governance
      • BoardManagement.sol
        • BoardManagement
      • ProxyVoting.sol
        • ProxyVoting
    • Identity
      • AttestationRegistry.sol
        • AttestationRegistry
      • ERC20PaymentResolver.sol
        • ERC20PaymentResolver
      • Roles
        • BaseRoles.sol
          • BaseRoles
        • PrivateOfferingRoles.sol
          • PrivateOfferingRoles
        • PublicOfferingRoles.sol
          • PublicOfferingRoles
      • Whitelist.sol
        • Whitelist
    • Issuance
      • Compensation
        • CompensationFactory.sol
          • CompensationFactory
        • EmployeeStockOptionCompensation.sol
          • EmployeeStockOptionCompensation
        • RestrictedStockAwardCompensation.sol
          • RestrictedStockAwardCompensation
        • StockAppreciationRightsCompensation.sol
          • StockAppreciationRightCompensation
        • WarrantCompensation.sol
          • WarrantCompensation
      • Offering
        • ExemptOffering.sol
          • ExemptOffering
        • InitialPublicOffering.sol
          • InitialPublicOffering
        • Offering.sol
          • Offering
        • OfferingFactory.sol
          • OfferingFactory
        • Rule506bOffering.sol
          • Rule506bOffering
        • Rule506cOffering.sol
          • Rule506cOffering
        • TenderOffer.sol
          • TenderOffer
    • Investor Relations
      • DividendDistributor.sol
        • DividendDistributor
      • SubscriptionManager.sol
        • SubscriptionManager
        • IERC20
    • Ledgers
      • Ledger.sol
        • Ledger
      • LedgerManager.sol
        • LedgerManager
      • SettlementManager.sol
        • SettlementManager
    • Marketplace
      • AuctionMarket.sol
        • AuctionMarket
      • BaseMarket.sol
        • BaseMarket
      • BulletinBoardMarket.sol
        • BulletinBoardMarket
      • Contents
        • BaseCollateral.sol
          • BaseCollateral
        • ERC20Collateral.sol
          • ERC20Collateral
        • NativeCollateral.sol
          • NativeCollateral
      • LiquidityPoolMarket.sol
        • LiquidityPoolMarket
      • Contents
        • BaseMargin.sol
          • BaseMargin
        • MarginAccount.sol
          • MarginAccount
      • MarginOrderBookMarket.sol
        • MarginOrderBookMarket
      • OTCMarket.sol
        • OTCMarket
      • OrderBookMarket.sol
        • OrderBookMarket
      • Contents
        • BrokerNetSettlement.sol
          • BrokerNetSettlement
        • CustodyBridge.sol
          • CustodyBridge
        • DirectSettlement.sol
          • DirectSettlement
        • ListingRegistry.sol
          • ListingRegistry
    • Tokenization
      • Actions
        • CorporateActionManager.sol
          • CorporateActionManager
          • ICapitalAsset
        • ICorporateActionManager.sol
          • ICorporateActionManager
      • Assets
        • Asset.sol
          • Asset
          • Asset
        • ClosedEndFundClass.sol
          • ClosedEndFundClass
        • ClosedEndFundManager.sol
          • ClosedEndFundManager
        • EmployeeStockOption.sol
          • EmployeeStockOption
        • Contents
          • IAsset.sol
            • IAsset
          • IClosedEndFundClass.sol
            • IClosedEndFundClass
          • IIssuedAsset.sol
            • IIssuedAsset
          • IOpenEndFundClass.sol
            • IOpenEndFundClass
          • IShareClass.sol
            • IShareClass
        • IssuedAsset.sol
          • IssuedAsset
        • OpenEndFundClass.sol
          • OpenEndFundClass
        • OpenEndFundManager.sol
          • OpenEndFundManager
        • ShareClass.sol
          • ShareClass
        • StockAppreciationRight.sol
          • StockAppreciationRight
        • Warrant.sol
          • Warrant
      • TokenFactory.sol
        • TokenFactory
    • Utilities
      • PriceFeed.sol
        • SimplePriceFeed
        • IPriceFeed
    • Valuations
      • ValuationRegistry.sol
        • ValuationRegistry
    • Wallet
      • HookedSmartWallet.sol
        • HookedSmartWallet
      • Wallet.sol
        • Wallet
Powered by GitBook
On this page
  • State Variables
  • compensationImplementations
  • allCompensations
  • rule701Exemptions
  • Functions
  • constructor
  • addCompensationImplementation
  • createRule701Exemption
  • createCompensation
  • getAllCompensations
  • _getRevertMsg
  • Events
  • CompensationFactoryCreated
  • CompensationImplementationAdded
  • CompensationCreated
  • Rule701ExemptionCreated
  • Structs
  • CompensationImplementation

Was this helpful?

  1. API Reference
  2. Issuance
  3. Compensation
  4. CompensationFactory.sol

CompensationFactory

PreviousCompensationFactory.solNextEmployeeStockOptionCompensation.sol

Last updated 3 months ago

Was this helpful?

A factory contract that registers different compensation contract implementations (e.g., ESO, RSA) and deploys clones of these implementations.

State Variables

compensationImplementations

mapping(bytes32 => CompensationImplementation) public compensationImplementations;

allCompensations

address[] public allCompensations;

rule701Exemptions

mapping(address => address) public rule701Exemptions;

Functions

constructor

Registers initial compensation implementations.

constructor(CompensationImplementation[] memory _implementations);

Parameters

Name
Type
Description

_implementations

CompensationImplementation[]

Array of compensation implementations to register.

addCompensationImplementation

Adds (or updates) a compensation implementation dynamically.

function addCompensationImplementation(CompensationImplementation memory _implementation) external;

Parameters

Name
Type
Description

_implementation

CompensationImplementation

The compensation implementation details.

createRule701Exemption

Creates (and tracks) a Rule701Exemption for msg.sender with an initialCap. Reverts if one already exists for the given msg.sender.

function createRule701Exemption(uint256 initialCap) external returns (address);

createCompensation

Deploys a new compensation contract using a minimal proxy clone of the registered implementation.

function createCompensation(bytes32 compImplId, bytes calldata initCallData) external returns (address newComp);

Parameters

Name
Type
Description

compImplId

bytes32

The identifier of the compensation implementation to clone.

initCallData

bytes

The call data used to initialize the newly cloned contract. Must start with the requiredSelector for this implementation.

Returns

Name
Type
Description

newComp

address

The address of the newly deployed compensation contract.

getAllCompensations

Returns an array of all deployed compensation contracts.

function getAllCompensations() external view returns (address[] memory);

_getRevertMsg

Extracts a revert message from failed external calls.

function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory);

Parameters

Name
Type
Description

_returnData

bytes

The return data from the call.

Returns

Name
Type
Description

<none>

string

The revert message string.

Events

CompensationFactoryCreated

event CompensationFactoryCreated(address indexed factory);

CompensationImplementationAdded

event CompensationImplementationAdded(
    bytes32 indexed compImplId, string compType, address implementation, bytes4 requiredSelector, bool active
);

CompensationCreated

event CompensationCreated(address indexed compensation, address indexed creator, bytes32 indexed compImplId);

Rule701ExemptionCreated

event Rule701ExemptionCreated(address indexed issuer, address rule701Exemption);

Structs

CompensationImplementation

Struct for storing compensation implementation details.

struct CompensationImplementation {
    string compType;
    address implementation;
    bytes4 requiredSelector;
    bool active;
}

Properties

Name
Type
Description

compType

string

A human-readable name or identifier for the compensation (e.g., "ESO", "RSA").

implementation

address

The address of the deployed implementation contract.

requiredSelector

bytes4

The function selector expected in the first 4 bytes of the initialization call.

active

bool

Whether this implementation is active and can be cloned.

Git Source