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
  • Functions
  • createLot
  • sellFromToken
  • adjustToken
  • applyStockDividend
  • applyStockSplit
  • getToken
  • getRawToken
  • getVotingPower
  • operator
  • Events
  • StockSplitApplied
  • StockDividendApplied

Was this helpful?

  1. API Reference
  2. Tokenization
  3. Assets
  4. Contents
  5. IShareClass.sol

IShareClass

PreviousIShareClass.solNextIssuedAsset.sol

Last updated 3 months ago

Was this helpful?

Inherits:

Functions

createLot

Creates a brand-new lot (e.g., an initial issuance) for a user.

function createLot(
    address owner,
    uint96 quantity,
    address paymentCurrency,
    uint96 costBasis,
    uint64 acquisitionDate,
    string memory uri,
    bytes memory data
) external returns (bytes32 tokenId);

Parameters

Name
Type
Description

owner

address

The owner of the lot.

quantity

uint96

The total raw quantity for this lot.

paymentCurrency

address

The payment currency for this lot.

costBasis

uint96

Raw cost basis per share/unit.

acquisitionDate

uint64

The original acquisition date.

uri

string

The URI of the lot.

data

bytes

Additional data associated with the lot.

Returns

Name
Type
Description

tokenId

bytes32

The unique ID of the new lot.

sellFromToken

Sells a certain raw quantity from an existing lot. If partial, invalidates the old lot and creates a new remainder lot with the same cost basis.

function sellFromToken(address owner, bytes32 tokenId, uint96 realSellQuantity) external returns (bytes32 newTokenId);

Parameters

Name
Type
Description

owner

address

The user who owns the lot.

tokenId

bytes32

The ID of the lot to sell from.

realSellQuantity

uint96

The raw quantity to sell from this lot.

Returns

Name
Type
Description

newTokenId

bytes32

The new lot ID if partial remainder exists, else 0x0.

adjustToken

Creates a new lot as a child of an old lot, typically used for spin-offs, cost basis corrections, partial reclassifications, etc.

function adjustToken(bytes32 oldTokenId, uint96 newQuantity, uint96 newCostBasis, string calldata reason)
    external
    returns (bytes32 newTokenId);

Parameters

Name
Type
Description

oldTokenId

bytes32

The old lot to be adjusted.

newQuantity

uint96

The raw quantity for the new lot.

newCostBasis

uint96

The raw cost basis for the new lot.

reason

string

A short string explaining the adjustment type, e.g. "SpinOff", "ManualCorrection".

Returns

Name
Type
Description

newTokenId

bytes32

The ID of the newly created lot.

applyStockDividend

Applies a stock dividend. If reducesBasis is true, we treat it like a split for cost basis. Otherwise, only the share quantity ratio is updated.

function applyStockDividend(uint96 divNum, uint96 divDen, bool reducesBasis) external;

Parameters

Name
Type
Description

divNum

uint96

Numerator of the dividend ratio.

divDen

uint96

Denominator of the dividend ratio.

reducesBasis

bool

Whether this dividend reduces cost basis.

applyStockSplit

Applies a new stock split ratio (e.g., 2-for-1). This function updates the cumulativeSplitNum/cumulativeSplitDen ratio multiplicatively.

function applyStockSplit(uint96 splitNum, uint96 splitDen) external;

Parameters

Name
Type
Description

splitNum

uint96

Numerator of the new split ratio.

splitDen

uint96

Denominator of the new split ratio.

getToken

Returns the stored data plus "real" (post-split+dividend) quantity and costBasis.

function getToken(bytes32 tokenId)
    external
    view
    returns (
        bytes32 parentTokenId,
        bool isValid,
        uint96 realQuantity,
        uint96 realCostBasis,
        uint64 acquisitionDate,
        uint64 lastUpdate,
        string memory uri,
        bytes memory data
    );

Parameters

Name
Type
Description

tokenId

bytes32

The lot ID to query.

Returns

Name
Type
Description

parentTokenId

bytes32

Hash of the parent lot, or 0x0 if none.

isValid

bool

Whether the lot is active.

realQuantity

uint96

The adjusted quantity after splits/dividends.

realCostBasis

uint96

The adjusted cost basis after splits (and optionally dividends).

acquisitionDate

uint64

The original acquisition timestamp (unmodified).

lastUpdate

uint64

The last time this lot was updated.

uri

string

The URI of the lot.

data

bytes

Additional data associated with the lot.

getRawToken

Convenience function to return the raw stored data without transformations.

function getRawToken(bytes32 tokenId)
    external
    view
    returns (
        bytes32 parentTokenId,
        bool isValid,
        uint96 quantity,
        uint96 costBasis,
        uint64 acquisitionDate,
        uint64 lastUpdate
    );

Parameters

Name
Type
Description

tokenId

bytes32

The lot ID to query.

Returns

Name
Type
Description

parentTokenId

bytes32

Hash of the parent lot, or 0x0 if none.

isValid

bool

Whether the lot is active.

quantity

uint96

The raw quantity.

costBasis

uint96

The raw cost basis.

acquisitionDate

uint64

The original acquisition timestamp.

lastUpdate

uint64

The last time this lot was updated.

getVotingPower

Returns the voting power of an account.

function getVotingPower(address account) external view returns (uint256);

Parameters

Name
Type
Description

account

address

The address of the account.

Returns

Name
Type
Description

<none>

uint256

The voting power of the account.

operator

Returns the address of the current operator.

function operator() external view returns (address);

Returns

Name
Type
Description

<none>

address

The operator address.

Events

StockSplitApplied

Events for corporate actions

event StockSplitApplied(uint96 splitNum, uint96 splitDen);

StockDividendApplied

event StockDividendApplied(uint96 divNum, uint96 divDen, bool reducesBasis);
Git Source
IIssuedAsset