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
  • status
  • issuer
  • asset
  • paymentToken
  • totalInvested
  • pricePerToken
  • minInvestment
  • investmentDeadline
  • targetAmount
  • maxAmount
  • uri
  • nextInvestmentId
  • investments
  • investmentInvestors
  • Functions
  • constructor
  • invest
  • countersign
  • _beforeCountersign
  • _afterCountersign
  • _createLotTokensToInvestor
  • closeOffering
  • setPricePerToken
  • _validateInvestment
  • setMinInvestment
  • setInvestmentDeadline
  • extendInvestmentDeadline
  • setTargetAmount
  • setMaxAmount
  • cancelOffering
  • setURI
  • _completeOfferingInternal
  • Events
  • OfferingCreated
  • OfferingInvested
  • OfferingInvestmentCountersigned
  • OfferingPricePerTokenUpdated
  • OfferingMinInvestmentUpdated
  • OfferingInvestmentDeadlineUpdated
  • OfferingTargetAmountUpdated
  • OfferingMaxAmountUpdated
  • OfferingURIUpdated
  • OfferingCancelled
  • OfferingClosed
  • Structs
  • Investment
  • Enums
  • Status

Was this helpful?

  1. API Reference
  2. Issuance
  3. Offering
  4. Offering.sol

Offering

PreviousOffering.solNextOfferingFactory.sol

Last updated 3 months ago

Was this helpful?

Inherits:

A base abstract contract for any kind of offering (public or exempt). Derived contracts must implement 'invest' logic and any finishing steps.

State Variables

status

Status public status;

issuer

address public issuer;

asset

Asset public asset;

paymentToken

IERC20 public paymentToken;

totalInvested

uint256 public totalInvested;

pricePerToken

uint256 public pricePerToken;

minInvestment

uint256 public minInvestment;

investmentDeadline

uint256 public investmentDeadline;

targetAmount

uint256 public targetAmount;

maxAmount

uint256 public maxAmount;

uri

string public uri;

nextInvestmentId

uint256 public nextInvestmentId;

investments

mapping(uint256 => Investment) public investments;

investmentInvestors

mapping(uint256 => address) public investmentInvestors;

Functions

constructor

constructor(
    address _issuer,
    address _asset,
    address _paymentToken,
    uint256 _pricePerToken,
    uint256 _minInvestment,
    uint256 _investmentDeadline,
    uint256 _targetAmount,
    uint256 _maxAmount,
    string memory _uri
);

invest

Allows an investor to invest in this offering. Implementation differs for public vs exempt offerings.

function invest(uint256 _amount, uint256 _pricePerToken) external virtual;

countersign

*Countersign the investment for a specific investor, which:

  1. createLots tokens to the investor

  2. Transfers their funds from escrow to issuer*

function countersign(uint256 investmentId) external virtual;

Parameters

Name
Type
Description

investmentId

uint256

The ID of the investment to countersign

_beforeCountersign

function _beforeCountersign(address) internal virtual;

_afterCountersign

function _afterCountersign(address) internal virtual;

_createLotTokensToInvestor

Internal function to createLot tokens to investor. Must be implemented by derived contracts.

function _createLotTokensToInvestor(address investor, uint256 amount) internal virtual;

closeOffering

Closes the offering, preventing further investments.

function closeOffering() external virtual;

setPricePerToken

Set the price per token for this offering.

function setPricePerToken(uint256 newPrice) external;

_validateInvestment

Helper function to validate investment constraints. Child contracts should call this in their invest() implementation.

function _validateInvestment(uint256 amount) internal view;

setMinInvestment

Set the minimum investment per investor.

function setMinInvestment(uint256 newMin) external;

setInvestmentDeadline

Set an investment deadline (UTC timestamp). Setting this to 0 effectively removes the deadline.

function setInvestmentDeadline(uint256 newDeadline) external;

extendInvestmentDeadline

Extend the current investment deadline to newDeadline (which must be later).

function extendInvestmentDeadline(uint256 newDeadline) external;

setTargetAmount

Set a target amount for this offering (informational/tracking only).

function setTargetAmount(uint256 newTarget) external;

setMaxAmount

Set a maximum total investment allowed in this offering. Setting this to 0 removes any max limit.

function setMaxAmount(uint256 newMax) external;

cancelOffering

The issuer can explicitly cancel the offering. No more investments or countersigns allowed.

function cancelOffering() external;

setURI

The issuer can update the URI pointing to any relevant data (e.g. promotional image or JSON).

function setURI(string calldata newURI) external;

_completeOfferingInternal

function _completeOfferingInternal() internal;

Events

OfferingCreated

Events

event OfferingCreated(
    address indexed issuer,
    address indexed asset,
    address indexed paymentToken,
    uint256 pricePerToken,
    uint256 minInvestment,
    uint256 investmentDeadline,
    uint256 targetAmount,
    uint256 maxAmount,
    string uri
);

OfferingInvested

event OfferingInvested(address indexed investor, uint256 investmentId, uint256 amount, uint256 pricePerToken);

OfferingInvestmentCountersigned

event OfferingInvestmentCountersigned(address indexed investor, uint256 investmentId, uint256 amount);

OfferingPricePerTokenUpdated

event OfferingPricePerTokenUpdated(uint256 newPrice);

OfferingMinInvestmentUpdated

event OfferingMinInvestmentUpdated(uint256 newMin);

OfferingInvestmentDeadlineUpdated

event OfferingInvestmentDeadlineUpdated(uint256 newDeadline);

OfferingTargetAmountUpdated

event OfferingTargetAmountUpdated(uint256 newTarget);

OfferingMaxAmountUpdated

event OfferingMaxAmountUpdated(uint256 newMax);

OfferingURIUpdated

event OfferingURIUpdated(string newURI);

OfferingCancelled

event OfferingCancelled();

OfferingClosed

event OfferingClosed();

Structs

Investment

struct Investment {
    uint256 amount;
    bool countersigned;
    uint256 pricePerToken;
}

Enums

Status

enum Status {
    Active,
    Completed,
    Cancelled
}
Git Source
BaseRoles